Well, this blog post is a summary of my IIS.net discussion with a user.So what should we do when IIS reports 500 error? You first idea might be posting "I meet an IIS 500 error" somewhere on IIS.net or StackOverflow.com. But is that enough to get the answer and help you want? Of course not. Of all IIS status codes, 500 is probably a category of its own, which can be caused by tons of root causes,
Thus, I love the new design of IIS 7+ (7.0, 7.5, and 8.0) which provides a detailed error page for such issues. Sometimes by properly interpreting the error messages, you might identify the problem fully on your own. OK, below is an example,
OK, how to interpret the above error page? I have already highlighted the portion we should focus on.
We start from the error code, as by using a simple command line tool published by Microsoft, you can easily know the meaning of it,
Please download and extract the err.exe from this package. Running it at command prompt and ask what is 0x800703e9, you instantly know that stack overflow happened,
# for hex 0x800703e9 / decimal -2147023895 :
# Is raised by the EE when the execution stack overflows as
# it is attempting to ex
# 1 matches found for "800703e9"
Do you know what is stack overflow? Wikipedia shows it clearly. Do you also know what is URL Rewrite? Microsoft makes it clear here. So if you are familiar with both like me, the root cause is almost clear. Right! If the rewrite rules lead to infinite redirection then the stack overflow is expected.
Next time when you hit a 500 error page, please make sure you digest the information inside actively. Only after that you can post your problem to an online forum and expect assistance from others. Or if you are lucky enough, you can locate the culprit before anyone else.