Enabling ASP Classic error messages in IIS7 and Windows Web Server 2008

I recently moved my asp classic code from my windows 2000 web server to my windows 2008 web server. But alas, error messages are turned off by default. I got a whole lot of blank pages with grinding hour glasses.

To turn back on the error messages, I found two invaluable posts on the web:

The first post covered about everything I needed:

ASP Detailed Error Messages. From this post, these are the three things that are required for turning on error messages. Most developers will likely already have the first step done.

"Turn off HTTP Friendly Errors in your web browser.
http://support.microsoft.com/kb/294807

To revert back to IIS6- behavior, simply run the following command:
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

You also have to configure IIS custom-error to allow detailed errors to be sent to remote clients.
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpErrors -errorMode:Detailed (default is DetailedLocalOnly)."

I wanted to see if there was a GUI method of doing the above two commands, and found a screenshot for  scriptErrorSentToBrowser in this second post.

I couldn't find a GUI method of doing the errorMode, and you'll notice that AnilR recommends "Note that you would never want to do the last step on a production server." If anyone knows where this can be setup via the GUI, please let us know.

The second post lists Tips for Classic ASP Developers. Scroll down to the section on "Script errors no longer shown in browser by default." There you'll see screenshots of how to set the "scriptErrorSentToBrowser" setting via the GUI. This second post doesn't mention the "errorMode" but I found that doing the first command without the errorMode command was useless. I had to have the second command before messages were sent to the screen.

You may also wish to look at the next section on preventing errors due to the "Parents paths disabled by default" setting.

I also should mention that you may need to run your commands as Administrator, from this post on "Classic ASP: Security is Painful" we read these steps on running as administrator:

"1) Start an elevated command prompt. Right-click the command shell item in the Start-Accessories menu and select "Run as Administrator".

2) Run the following command: %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true"

May your dreams be in ASP.NET and your classic applications magically converted to .NET while you sleep,

Nannette Thacker

 

7 Comments

Comments have been disabled for this content.