当我添加其中任何一个时...
<%@ 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 执行失败的请求跟踪时,我注意到了这一点....