Wednesday, May 2, 2012

Enable ASP error on IIS7


As a result of security paranoia, ASP's default behavior of sending script errors (including line number and code snippet to the browser has been turned off .  So instead of seeing the typical error you would see ASP throw, you will now see this:
------------------------------------------------------------------------------------------------------------
An error occurred on the server when processing the URL. Please contact the system administrator
------------------------------------------------------------------------------------------------------------

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

Enjoy :)

No comments: