【发布时间】:2010-03-29 07:37:02
【问题描述】:
当我添加其中任何一个时...
<%@ OutputCache Duration="600" Location="Any" VaryByParam="*" %>
或
<%@ OutputCache CacheProfile="CmsArticlesListOrItem" %>
(.. and this into the web.config file...)
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="CmsArticlesListOrItem" duration="600" varyByParam="*" />
</outputCacheProfiles>
</outputCacheSettings>
<sqlCacheDependency ........ ></sqlCacheDependency
</caching>
我的页面/网站崩溃并出现以下错误:-
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& 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& completedSynchronously)
好的 .. 所以出于某种原因,OutputCache 想要一个文件夹/文件在那里? ? ? ?
嗯,我已经让这个网站运行了大约 3 年,我很确定文件夹 \Controls 和 \Controls\InfoAdvice 在我的生产服务器上不存在。在我的本地主机上,它确实可以......并且包含大量 ascx 控件。
但它们在我的实时服务器上不存在。
那么……这是怎么回事?
有人可以帮忙吗?
哦 :) 在有人建议我创建这两个文件夹甚至在这些文件夹中粘贴一个随机文件之前.. 并在这些随机文件中添加一些随机文本.. 我已经这样做了,但它似乎不起作用,还是:(
请帮忙!
更新
当我尝试使用 IIS 执行 FAILED REQUEST TRACE 时,我注意到了这一点......
alt text http://img136.imageshack.us/img136/1351/notsure.png
【问题讨论】:
标签: asp.net webforms crash outputcache