RMTWeb

View Original

IIS 7 – Sending classic ASP Errors to the browser

I’m now using Windows Server 2008 (though this issue occurs in Windows Vista and Windows 7 too and thus have IIs 7) and I’ve got many older websites and systems that were written in ASP that I need to update, and the problem was that all I get is a lovely 500 error message on the browser, and no details on how to change it to the way IIs 6 was, and send the error to the browser (local or remote). So after a bit of digging and testing all manner of other instructions that didnt seem to work using the IIs 7 UI, I finally found something that works!

Here is the solution:

On the server (or machine running IIs 7) open a command window (Start, Run, cmd) – you might need Administrative priviliges if on a domain controlled network

Type CD/ (and then press Enter)

Type CD Windows (Or whatever the folder name is for your windows installation) (and then press Enter)

Type CD System32 (and then press Enter)

Type CD Inetsrv (and then press Enter)

Type appcmd set config -section:asp -scriptErrorSentToBrowser:true (and then press Enter)

Type appcmd set config -section:system.webServer/httpErrors -errorMode:Detailed (and then Press Enter)

Close the command window – sorted!

You will now find that errors are sent to the browser on remote machines as well as the local browser on the server / IIs 7 machine.

Please leave a comment if this has worked for you!