我刚刚升级到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引用才会出现此错误以及如何解决错误?
答案 0 :(得分:1)
我遇到了同样的错误。我发现这个德语页面描述了这个问题(谷歌翻译在翻译方面做得很好):
解决方案很简单,只需在构建期间创建缺少的目录。我刚刚在我的发布配置文件中添加了MakeDir行,问题就消失了。