Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

debugging - ASP.Net debug directory monitoring HttpException

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:srcmain-232srcNodenode_MultiFrontWebControlsCat5Navigation'. 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: 

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...