FATAL: System.Web.HttpException (0x80070057): Invalid file name for file monitoring: ''

540 views Asked by At

I get the following issue :

FATAL: System.Web.HttpException (0x80070057): Invalid file name for file monitoring: ''.

Common reasons for failure include: - The filename is not a valid Win32 file name. - The filename is not an absolute path. - The filename contains wildcard characters. - The file specified is a directory. - Access denied.

My code :

        CacheItemRemovedCallback onRemove = new CacheItemRemovedCallback(this.CacheRemovedCallback);

            HttpRuntime.Cache.Insert(
                "key"
                , ""
                , null
                , DateTime.Now.AddSeconds(5)
                , System.Web.Caching.Cache.NoSlidingExpiration
                , CacheItemPriority.High
                , onRemove);

    public void CacheRemovedCallback(String key, object value, System.Web.Caching.CacheItemRemovedReason removedReason)
    {
    }

Why does it check for Cache dependency file even when the I have passed the parameter as "null" ???

0

There are 0 answers