How to Enable/Disable Classic ASP custom error messages in IIS7 ?

First I will tell you why we need this customize error message .If we are not providing the customize error option , once any error occurs in our application, it will throw the detailed error report to the end user . This will create huge security issues, Because these error messages might reveal sensitive information to malicious users. In IIS7 onward end user will not be able to see the details error report from the browser .Here we can see, How to Enable/Disable Classic ASP custom error messages in IIS7 ?. And here you will come to know, How to get the complete error details in Classic ASP ?

If any error occurred in classic ASP Application in IIS7, By default end user will the message as :

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.

How to Disable Classic ASP custom error messages in IIS7?

In IIS7 ,In the list of ASP features we have two properties 1) Script Error Message 2)Send Errors To Browser options.

1)Script Error Message : This is an optional string attribute that specifies the error message that will be sent to the browser when specific debugging errors are not sent to the client.
2)scriptErrorSentToBrowser: This is also an optional Boolean attribute that specifies whether the writing of debugging specifics to the client browser is enabled.If the vale is set as true, then instead of script error Message , detailed error message will sent to the browser.

if you want to enable the custom error  option you shold turn this flag as false

please refer the below given screenshot.

i1

i2

 

 

 

 

 

 

 

 

 

 

 


You can also configure these settings by 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”

 

thanks!!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *