title: Adding OutputCache to an ASP.NET WebForm crashes my site :(
body: <p>When I add either one of these ...</p>
  <pre><code>&lt;%@ OutputCache Duration=&quot;600&quot; Location=&quot;Any&quot; VaryByParam=&quot;*&quot; %&gt;
  </code></pre>
  <p>or</p>
  <pre><code>&lt;%@ OutputCache CacheProfile=&quot;CmsArticlesListOrItem&quot; %&gt;
  
  (.. and this into the web.config file...)
  &lt;caching&gt;
      &lt;outputCacheSettings&gt;
          &lt;outputCacheProfiles&gt;
              &lt;add name=&quot;CmsArticlesListOrItem&quot; duration=&quot;600&quot; varyByParam=&quot;*&quot; /&gt;
           &lt;/outputCacheProfiles&gt;
      &lt;/outputCacheSettings&gt;
  
      &lt;sqlCacheDependency ........ &gt;&lt;/sqlCacheDependency
  &lt;/caching&gt;
  </code></pre>
  <p>my page/site crashes with the following error:-</p>
  <pre><code>Source: System.Web
  ----------------------------------------------------------------------------
  TargetSite: System.Web.DirectoryMonitor FindDirectoryMonitor(System.String, Boolean, Boolean)
  ----------------------------------------------------------------------------
  Message:System.Web.HttpException: Directory 'C:\Web Sites\My Site Foo - Main Site\Controls\InfoAdvice' does not exist. Failed to start monitoring file changes.
     at System.Web.FileChangesMonitor.FindDirectoryMonitor(String dir, Boolean addIfNotFound, Boolean throwOnError)
     at System.Web.FileChangesMonitor.StartMonitoringPath(String alias, FileChangeEventHandler callback, FileAttributesData&amp; fad)
     at System.Web.Caching.CacheDependency.Init(Boolean isPublic, String[] filenamesArg, String[] cachekeysArg, CacheDependency dependency, DateTime utcStart)
     at System.Web.Caching.CacheDependency..ctor(Int32 dummy, String[] filenames, DateTime utcStart)
     at System.Web.Hosting.MapPathBasedVirtualPathProvider.GetCacheDependency(String virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart)
     at System.Web.ResponseDependencyList.CreateCacheDependency(CacheDependencyType dependencyType, CacheDependency dependency)
     at System.Web.HttpResponse.CreateCacheDependencyForResponse(CacheDependency dependencyVary)
     at System.Web.Caching.OutputCacheModule.InsertResponse(HttpResponse response, HttpContext context, String keyRawResponse, HttpCachePolicySettings settings, CachedVary cachedVary, CachedRawResponse memoryRawResponse)
     at System.Web.Caching.OutputCacheModule.OnLeave(Object source, EventArgs eventArgs)
     at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)
  </code></pre>
  <p>Ok .. so for some reason, the <code>OutputCache</code> wants a folder/file to be there? ? ? ?</p>
  <p>Well, i've had this site live for around 3 years and i'm pretty sure that the folders <code>\Controls</code> and <code>\Controls\InfoAdvice</code> doesn't exist on my production server. On my localhost, it sure does .. and contains a large list of ascx controls.</p>
  <p>But they don't exist on my live server.</p>
  <p>So  ...  what is going on here?</p>
  <p>Can anyone please help?</p>
  <p>Oh :) Before someone suggests I create those two folders and even stick a random file in those folders .. and have some random text in those random files .. i've done that and it doesn't seem to work, still :(</p>
  <p>Please Help !</p>
  <h3>Update</h3>
  <p>When i tried to do a FAILED REQUEST TRACE with IIS, I noticed this....</p>
  <p><a href="http://img136.imageshack.us/img136/1351/notsure.png" rel="nofollow noreferrer">alt text http://img136.imageshack.us/img136/1351/notsure.png</a></p>