Get Detailed 500 Error
Contents |
you deploy it to your IIS server. Now you’re getting the dreaded 500 – Internal server error. What are you to do? As you may know, 500 internal server error iis 8 a HTTP 500 error is a generic error message returned by a web
Iis 500 Error Log
server when it knows something has gone wrong but it is unable to be more specific about the
Iis Detailed Error Messages
error. That’s not necessarily helpful, though, when you are trying to figure out what is causing the error so you can fix it and get your web site to load. Here
500 Internal Server Error Iis 7
are a few tips to help you find the real error so you can get your site loading properly. Classic ASP If you are running Classic ASP on IIS 7 or IIS 8, just about any error that you get from an out-of-the-box installation will be a 500 error. You should check out this blog post for more information on developing 500.0 - module or isapi error occurred. Classic ASP applications in IIS 7 or later. Tips for finding the real error Run the site directly on the server – depending on the configuration of your site/server, you may be able to see the real error if you load the site from a browser located on the same server. You may need to turn off ‘show friendly http errors.’ Temporarily add the following within the appropriate tags in your web.config file:
information to prevent revealing sensitive information about web.config detailed errors your web application: Sometimes you need to see iis 500 internal server error log error details (think shared hosting). Add these entries to your web.config file to an error occurred on the server when processing the url disable generic errors:
IIS 500 errors leave clues in the log Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Yesterday I was playing around with thevalidateIntegratedModeConfiguration="true" setting http://www.dotnetnoob.com/2012/03/iis-500-errors-leave-clues-in-log.html on IIS 7.5. To my surprise I got an empty response back, with no indication of what went wrong. Looking at the response with Fiddler yields: HTTP/1.1 500 Internal Server Error Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NET Date: Mon, 05 Mar 2012 15:59:52 GMT Content-Length: 0 There's not much to work with here! I checked the event log, there was nothing there. So I 500 internal started looking around for an error log of some sort (I used to play with Apache back in the days) turns out there's no such thing in IIS. Some googling led me to an in-depth article:Troubleshoot IIS7 errors like a pro. I enabled detailed error messages for my website, still no luck. Finally, I figured out that the easiest way to 500 internal server get an indication of what's going on is to check the IIS log. In the default setup, IIS keeps the logs for each website in:C:\inetpub\logs\LogFiles. Here's a log entry from my logfile (shortened for readability): 2012-03-05 15:59:52 ::1 GET /Somesite/ - 443 - ::1 Mozilla/5.0 500 22 50 1 Notice the "500 22" in the log? That's the 500 error, along with its substatus. The substatus is the key here, as you can look that up inMicrosoft's document onThe HTTP status codes in IIS 7.0 and in IIS 7.5. Voila, my error was actually: 500.22 - An ASP.NET httpModules configuration does not apply in Managed Pipeline mode. I can work with that. Of course, you could also enable failed request tracing in IIS if you're a pro, here's a walkthrough by the IIS team:Troubleshooting Failed Requests Using Tracing in IIS 7. I tried it, and it also revealed the substatus of the response. Still, checking the IIS log was a much faster way of getting an indication of what the problem was, and sometimes that's all you need. So check your logs first