gpt4 book ai didi

ASP.Net调试目录监控HttpException

转载 作者:行者123 更新时间:2023-12-02 06:59:52 24 4
gpt4 key购买 nike

当我在 Debug模式下启动 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:

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

最佳答案

好消息:它似乎没有任何链式 react

坏消息:我还没有找出原因或解决方案

解决方法:禁用 HttpException 的异常中断(调试->异常),并在日志中过滤掉这些异常。您仍然可以通过在 Application_Error 中放置断点来捕获 Debug模式下的其他 HttpException(如果您已经实现了它 - 但无论如何您都应该这样做)

关于ASP.Net调试目录监控HttpException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3925689/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com