【问题标题】:Directory 'Path' does not exist. Failed to start monitoring file changes目录“路径”不存在。无法开始监控文件更改
【发布时间】:2016-08-10 04:49:12
【问题描述】:

我刚刚升级到 Visual Studio 2013,并在发布我的 asp.net webforms 项目时发现了一个预编译和组合的新选项。

但在发布到我的测试服务器后,ajax 控制工具包停止工作。

查看事件日志后,我发现以下内容:

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 2014-12-12 16:06:48 
Event time (UTC): 2014-12-12 15:06:48 
Event ID: de260aa337ee442d877e35615225da8d 
Event sequence: 4 
Event occurrence: 1 
Event detail code: 0 
....
Exception information: 
    Exception type: HttpException 
    Exception message: Directory 'E:\...\AppRoot\Controls\View' 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.Hosting.MapPathBasedVirtualPathProvider.GetCacheDependency(String virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart)
   at System.Web.ResponseDependencyList.CreateCacheDependency(CacheDependencyType dependencyType, CacheDependency dependency)
   at System.Web.HttpResponse.CreateCacheDependencyForResponse()
   at System.Web.HttpCachePolicy.UpdateFromDependencies(HttpResponse response)
   at System.Web.HttpCachePolicy.UpdateCachedHeaders(HttpResponse response)
   at System.Web.HttpCachePolicy.GetHeaders(ArrayList headers, HttpResponse response)
   at System.Web.HttpResponse.UpdateNativeResponse(Boolean sendHeaders)
   at System.Web.HttpRuntime.FinishRequestNotification(IIS7WorkerRequest wr, HttpContext context, RequestNotificationStatus& status)

Request information: 
    Request URL: http://.../Forms/Public/StartForm.aspx?_TSM_CombinedScripts_=True&v=P4sRFgGfV4Nfd4EZMC8du8QjF0BC31YW_Px8RQK42ys1&_TSM_Bundles_=&cdn=False 
    Request path: /Forms/Public/StartForm.aspx 
    User host address: X.X.X.X
    User: {BFBFFDD1-...-4697-85E7-69A522272D6D} 
    Is authenticated: True 
    Authentication Type: Forms 
    Thread account name: IIS APPPOOL\app

问题是我合并预编译时没有生成目录~\Controls\View。 我检查了我的 web.config,它没有引用 ~\Controls\View

为什么这个错误只出现在 ajax 控件工具包 javascript 参考中,我该如何解决这个错误?

【问题讨论】:

  • 您是否下载了最新版本的工具包?您可能有一个不想使用 VS2013 的旧版本。
  • @CaseyCrookston 我正在使用最新版本 + 一些修复以使选项卡控件在 IE8 中正常工作..

标签: asp.net visual-studio-2013 iis-7.5 ajaxcontroltoolkit


【解决方案1】:

我遇到了同样的错误。我找到了这个描述问题的德语页面(谷歌翻译做得很好):

http://gehirnwindung.de/post/2010/01/18/ASPNET-Precompilation-und-die-Fehlermeldung-Directory-does-not-exist-Failed-to-start-monitoring-file-changes.aspx

解决方案很简单,只需在构建过程中创建缺少的目录即可。我刚刚在发布配置文件中添加了 MakeDir 行,问题就消失了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-27
    • 2020-05-02
    • 1970-01-01
    • 2020-10-19
    • 1970-01-01
    • 1970-01-01
    • 2016-01-13
    • 1970-01-01
    相关资源
    最近更新 更多