Show detailed Classic ASP error messages in IIS7 for both local and remote requests

In IIS7 you have to enable sending the detailed error message for Classic ASP.  You can do this by configuring Classic ASP in IIS7:

image

And then setting the “Send Errors to Browser” setting to true:

image

Now you will get the detailed Classic ASP error message when an error occurs in your Classic ASP pages.  But these will only show for local requests.  Remote requests will still display the standard IIS 500 - Internal Server Error:

image

Not sending detailed error messages for remote requests is the default since it is a good idea for remote requests not to see the full error details (it could expose sensitive data to the Internet).  But if you need to see it, such as on an internal testing server, follow these instructions to have IIS send the detailed error message for remote requests too.

In IIS go to the Error Pages:
 image

Then on the right click on the Edit Feature Settings...
 image

In the Edit Error Pages Settings dialog is where you choose to send for both local and remote requests.  The second option button is what needs to be selected to have the detailed errors returned for both local and remote requests.  The bottom option is what is on by default – where detailed error messages are only sent for local requests. 
 image
Keep in mind that it is not recommended to send detailed errors for remote requests since this could expose sensitive information to the Internet.

Published 14 November 2012 09:07 PM by Jeff Widmer
Filed under: ,

Comments

# Gustavo said on 03 December, 2012 06:04 AM

Not working for me. Keep getting the same 500 error message without details. I searched for a solution in all the web, but I only find the steps reported in this page, again and again. Don't know how to solve, I'm frustrated :-(

# Jeff Widmer said on 03 December, 2012 06:15 AM

Gustavo,

Make sure the request is actually hitting the IIS website and not getting stopped higher up.  For instance, if the path for the website changed, you will get an IIS error but there are no details since the actuall site is not able to run.  To debug, try requesting a simple page from the website (that doesn't have an error) to confirm the site is running normally. Then move onto a Classic ASP page that is working to confirm Classic ASP requests will be served.  And then try figuring out why the errors are not getting returned.

I hope this helps.

-Jeff

# Gustavo said on 27 June, 2013 05:04 AM

Solution finally found!

By default IIS7 intercepts HTTP status codes such as 4xx and 5xx generated by applications further up the pipeline.

In web.config I replaced the line

<httpErrors errorMode="Detailed">

with

<httpErrors existingResponse="PassThrough" errorMode="Detailed">

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Search

Go

This Blog

News

Syndication