I am trying to debug an error in an ASP.Net 3.5 application. We recently ported the application from IIS6 to 7. In IIS6, the code is as follows:
Throw new Exception("My message")
A page appears with an error message, a series of lines of code and a stack trace (using the "debug" compilation mode and no user errors).
In IIS7, a βverboseβ error message only gives the module code and errors:
HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred. Detailed Error Information Module global.asax Notification BeginRequest Handler StaticFile Error Code 0x00000000 Requested URL [My URL] Physical Path [My Path] Logon Method Not yet determined Logon User Not yet determined Failed Request Tracing Log Directory [My Directory]
I even set up a trace of failed requests, which tries to provide a stack trace, but which still does not give me any line numbers or error messages, only the module name and HTTP status.
No. 111. Severity Warning Event -MODULE_SET_RESPONSE_ERROR_STATUS ModuleName global.asax Notification 1 HttpStatus 500 HttpReason Internal Server Error HttpSubStatus 0 ErrorCode 0 ConfigExceptionInfo Notification BEGIN_REQUEST ErrorCode The operation completed successfully. (0x0)
How can I get the information I get in IIS6? I already know that the error is in global.asax, I need a line number and a specific error message.
Also, I'm not sure if this is related, but the site is precompiled and aspnet_compiler.exe seems to set the debug web.config parameter to false when compiling (even with the -d option). My machine.config does not have a deployment tag. I just set debug back to true and reworked after compilation, which I suppose will put the site back in debug mode, right?
source share