ASP.Net调试目录监视HttpException [英] ASP.Net debug directory monitoring HttpException
问题描述
以调试模式启动ASP.Net 4.0 Web应用程序时,出现以下异常:
When I start my ASP.Net 4.0 web app in debug mode, I'm getting the following exception:
System.Web.HttpException occurred
Message=Invalid file name for file monitoring: 'C:\src\main-232\src\ZNode\Znode_MultiFront\Web\Controls\Cat5\Navigation'. Common reasons for failure include:
- The filename is not a valid Win32 file name.
- The filename is not an absolute path.
- The filename contains wildcard characters.
- The file specified is a directory.
- Access denied.
Source=System.Web
ErrorCode=-2147024809
WebEventCode=0
StackTrace:
at System.Web.DirectoryMonitor.AddFileMonitor(String file)
InnerException:
问题是,指向的文件是一个目录,那么为什么Visual Studio 2010认为它是一个文件?我正在本地计算机上的IIS 7上运行它
The thing is, the file this is pointing to IS a directory, so why does Visual Studio 2010 think it's a file? I'm running this on IIS 7 on my local machine
推荐答案
好消息:它似乎没有任何连锁反应
坏消息:我还没有找到原因或解决办法
解决方法:禁用HttpException
的异常中断(Debug-> Exception),然后在日志中过滤掉这些异常.您仍然可以通过在Application_Error
中放置一个断点来在调试模式下捕获其他HttpException(如果已实现了该断点-但您仍然应该有一个断点)
The good news: it doesn't seem to have any knock-on effects
The bad news: I haven't figured out the cause or a solution
The workaround: Disable break-on-exception for HttpException
(Debug->Exception), and filter these out in your logs. You can still capture other HttpException in debug mode by placing a breakpoint in Application_Error
(if you have implmented it - but you should have anyway)
这篇关于ASP.Net调试目录监视HttpException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!