VirtualPathProvider issue

440 views Asked by At

Implemented a virtual path provider to dynamically load some files from a shared project in a new web application. Everything works fine in dev/deployed and local IIS. When deploying to production we are encountering "Failed to start monitoring file changes" error when trying to find a 'virtual file'. GetCacheDependency is overridden in our VirtualPathProvider but when I remote debug the function is never hit. Any Ideas?

EDIT:

  public override System.Web.Caching.CacheDependency GetCacheDependency(string virtualPath, System.Collections.IEnumerable virtualPathDependencies, DateTime utcStart)
    {
        if (CheckVirtual(virtualPath))
        {

            string realName = CustomVirtualPathProvider.CleansePath(virtualPath);

            return new System.Web.Caching.CacheDependency(baseDirectory + realName);

        }

        return Previous.GetCacheDependency(virtualPath, virtualPathDependencies, utcStart);
    }

I register the VPP in the global asax. It only fails in production which leads me to believe that its a iis settings issue.

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

enter image description here

0

There are 0 answers