ASP.Net调试目录监视HttpException

Bra*_*ani 10 asp.net debugging httpexception

当我在调试模式下启动我的ASP.Net 4.0 Web应用程序时,我收到以下异常:

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: 
Run Code Online (Sandbox Code Playgroud)

问题是,这是指向IS目录的文件,为什么Visual Studio 2010认为它是一个文件?我在本地计算机上的IIS 7上运行它

Vro*_*del 8

好消息:它似乎没有任何连锁效应

坏消息:我没有弄清楚原因或解决方案

解决方法:为HttpException(Debug-> Exception)禁用break-on-exception ,并过滤这些在你的日志中.您仍然可以通过放置一个断点来在调试模式下捕获其他HttpException Application_Error(如果您已经实现了它 - 但无论如何您应该拥有它)


小智 5

我遇到了同样的问题,通过选中Enable Just My CodeOptions: 中的复选框选项Tools->Options->Debugging->General,我让它工作了。