How to show detailed error messages on client browser (Classic ASP)

If you are (still) developing with Classic ASP, you might have noticed how hard it is to debug your applications. Classic ASP has its own settings which are different than the ones .NET has.

A generic error page

These 3 steps will help you to detect errors in your application successfully.

1- Turn on IIS debugging for ASP

IIS doesn’t send debugging details to browser by default. You can change this behavior and ask IIS to send details such as line number and trace to user:

  • Open IIS Manager. Click the application name
  • Double click “ASP
  • Expand “Debugging Properties
  • For the attribute “Send Errors to Browser“, select “True
IIS debugging settings for Classic ASP

2- Configure Error Pages

You can tell IIS to show details on common error pages such as 401, 404, 500:

Who Unfriended me on Facebook?
  • Open IIS Manager. Click the application name
  • Double click “Error Pages
  • Click on the error code
  • In Action Pane, click “Edit Feature Settings
  • Select “Detailed errors
Properties for common error pages

3- Let Internet Explorer to show error details

IE wants to show friendly error pages instead of detailed ones that are useful for developers. You can change this setting for debugging purposes:

  • Open Internet Explorer
  • Go to “Tools > Internet Options > Advanced
  • Unselect “Show friendly HTTP error messages
Internet Explorer settings

New error page will look like this:

Finally! We have a little bit more details about the error

Spread the word!

Leave a Reply

Your email address will not be published. Required fields are marked *