The personal Blog of Chris Dempsey

Chris is a web developer working freelance in Ayr nr Glasgow, Scotland. Other business interests include Underground Grapics, a company that manufactures vinyl decals for modified cars.

Saturday 20 March 2010

IIS 7.5 ASP Error

On freshly installed IIS 7.5 classic ASP website returns following generic error:

An error occurred on the server when processing the URL. Please contact the system administrator.

If you are the system administrator please click here to find out more about this error.

Issue is caused by IIS 7.5 being set by default to not send errors to the browser. To change open the relevant site in IIS, select ASP

Expand the Debugging Properties tree and set Send Errors To Browser to True. Then click Apply in the top right of the window.

IIS will now send errors to the browser allowing easier debugging. Sending errors to the browser is not recommended for production environments as it can give away information that you don't want to such as the path to an access database.

These settings can also be configured using the command-line tool AppCmd.exe with the following syntax:

appcmd.exe set config "Default Web Site" -section:system.webServer/asp /scriptErrorMessage:"An error occurred."

appcmd.exe set config "Default Web Site" -section:system.webServer/asp /scriptErrorSentToBrowser:"False"

No comments:

Post a Comment