You are running an ASP or ASP.NET web application on IIS on Windows 2008 R2 from a remote web browser and you constantly see following error message.
While this is the proper results for a production server (you never want to show remote users the details of an error), it is not helpful while testing a new installationā¦as a developer you need to see the error messages on the remote browser. There is an obscure setting that controls this for both ASP and ASP.NET. I hope the following will help anyone needing to see error details on a remote connected browser.
For Classic ASP Errors
In IIS Manager, select your ASP site, the double-click the ASP icon in the IIS section. The configuration settings for this ASP applications will appear. Open the section for Debugging and make sure the option Send Errors to Browser is set to True. Review other settings while you are here to ensure they match want you want.
For Classic ASP and ASP.NET Errors
Just making the change above seems to work find under IIS on Windows 7 but not Windows 2008 R2. You may need to change one other setting. In IIS Manager, select the ASP or ASP.NET site, the double-click the Error Pages icon in the IIS section (do not confuse with the .NET Error Pages in the ASP.NET section) . The list of error codes and related IIS Error Pages will appear. Select the one for 500 errors and right-mouse, then choose Edit Feature Settings from the popup menu.
The default settings is the third option which only allows detailed errors to be sent to a browser on the same server. Change this setting to the second option labeled Detail errors and then details of your code or script errors will be sent to the browser even if it is a remote quest. If you are using Internet Explorer, also make sure that Show Friendly Errors is not enabled. This is not a problem for Firefox users.
Be sure and change this setting back to the default if and when the server is used in a production environment. When that is the case, use the NT Event log for ASP errors (also set in the ASP settings section) and .NET Error Tracing as better ways to view the details of production errors. Hope this helps! Now you can view ASP and ASP.NET errors in the browser remotely. Here is an example of a Classic ASP error.
Just a shout out for making this totally obscure setting obvious I still dont get why basic stuff for use by an iis dev’s has to located on the back side of a right click menu burried 3 levels deep but just leave up to $ms$ to obfuscate
Just wanted to say thanks. Debugging is a pain without the line errors and setting up IIS on 2008 R2 was being more of a pain. You just saved me from pulling out my hair.
I also had to give Write permissions on the website folder to the IIS_IUSRS builtin group in order to see error messages in the browser. This may be because we store our websites outside the inetpub default folder structure.
Lena – I think you have to do this even when the folder is below inetpub. I think the permissions are read-only there as well. Thanks for mentioning this important step.
TKS!!
I tire this solution but not work.
Thanks for providing this detailed explanation. It worked and kept me from pulling my hair out and tossing the computer out the window! I am now able to successfully debug my ancient .asp code.
Sorry to say, I set everything as instructed, but in my case it is not working, I am receiving same error 500…
Thanks to you, but want to say that IIS 7.x is funniest product I ever seen, hell with it….
“Just making the change above seems to work find under IIS on Windows 7 but not Windows 2008 R2.” Not for me. I had to edit the asp error page on Windows 7 (home premium) to get asp errors to display line number information.
Thank you so much for this article! I have just started setting up web sites on IIS 7 and hit a roadblock until I found this. Worked like a charm!
Thanks ! I could not figure out why my app I migrated from IIS6 to IIS7 would not work until this.
Almost wanted to switch back to Apache web server.
Thank for sharing Dan. Glad to hear it was helpful.
THANK YOU!!
This was something Mocha Host’s Tech support couldn’t solve, and you solved it for me.
I now have to focus on growing back all the hair I pulled out š
LOL! Thanks Nico.
Not working for me. š
I followed all steps but it keeps showing the “500” error page.
THANK YOU .. this worked. Have been trying for hours to get the error messages to appear in R2 š
This chance should be done on Web Server level.
If you first select you ASP web side by clicking on it and then start doing the above changes – you will make those changes on the web site level what is may not be suffice.
Just to join the chorus…
Thanks for this posting, huge help.
Respect!
John
Thank you! I’ve been fighting ASP issues all week. This was just what I needed.
Hola! I’ve been reading your web site for a long time now and finally got the bravery to go ahead and give you a shout out from Austin Tx! Just wanted to tell you keep up the fantastic work!
Thanks for info but it’s not working for me.
Error are shown in detail when I use the browser (IE or FF) DIRECTLY on the webserver (via terminal services).
But in remote I keep receiving the “infamous” error 500. š
I think I’ve found the solution. In web.config I replaced the line
with
By default IIS7 intercepts HTTP status codes such as 4xx and 5xx generated by applications further up the pipeline.