简体   繁体   中英

How to debug an IIS 7 module?

We had an IIS 7 module that was failing in a rather odd way (to us, at least) - the 32 bit version of the module apparently had some strange behavior where it would look for the 64 bit version of the DLL and use that if it was on a 64 bit machine, rather than the 32 bit version, since we installed the 32 bit version on purpose.

Before we figured this out (read: finally guessed correctly), the behavior the module was exhibiting was "simply not working" - no error message, the module was not writing log files like it normally does (because it wasn't working at all), nothing in the Event Log, nothing in the IIS logs except for an acknowledgement that we had made a POST request to the page exhibiting the non-working behavior.

My question is: to prevent using as huge a chunk of time as we did on this, is there any log file or files where we could have seen that 'such and such a module has failed' or 'XYZ module threw a BadImageFormatException to have given us even a slight clue as to what was going on?

Thanks in advance

您可以使用Global.asax Application_Error将Server.Transfer重定向到自定义技术错误页面,该页面将使用GetLastError()显示HttpServerUtility服务器错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM