Configuring IIS8 for hosting a classic ASP application

When porting legacy a legacy asp application to IIS8 there is a number of additional configuration steps required. Classic asp doesn't automatically run. Once you have this configure, you'll need to test (and possibly debug) the application before deploying to production. When you first try to browse a asp application in IIS8, you'll be presented with a screen citing an extension configuration error.

IIS8 Extension Configuration Error

This is because classic asp (and handlers) are not installed. These features need to be added to the web server role.

Adding ASP feature to web Server role dialog

Once these features are added, you'll need to test you site works as expected. Unfortunately if any errors are encountered, you are prompted with an user friendly message, rather than the error itself.

IIS8 Classic asp script error message

To send error messages to the browser, additional ASP configuration is required within Internet Information Services Manager. This can be configured at the server or site level. Select the "ASP" button, drill down into the debugging properties and set the Send errors to browser property to true.

ASP configuration button in IIS8 Send errors to browser property

You'll now receive the familiar error feedback when refreshing the browser

Enabling Failed Request Tracing

This can be be taken a step further by installing the Tracing feature and enabling Failed Request Tracing for a given status code (typically 500)

Breaking this down

  1. Install the Tracing feature (under health and diagnostics)

    Adding the tracing feature in IIS8
  2. Configure the Tracing

    Configure tracing in site actions Failed tracing request button in IIS8 Enable failed request tracing in IIS8
  3. Add a Tracing rule

    New failed request trace rule - specify content New failed request trace rule - define conditions Failed trace request site rules

Once this is configured there should be a new folder within C:\inetpub\logs called FailedReqLogFiles which will capture all the failed requests in XML log files.

FailedReqLogFiles folder within logs

Now, when you refresh the site, you'll be present with the standard HTTP Status code 500, but if you browse to the FailedReqLogFiles you get a detailed breakdown of whats going on

HTTP Error Status 500 Classic asp failed tracing request log

A detailed post Using Failed Request Tracing to troubleshoot Classic ASP errors explains how to make the most of this tracing feature