Hello Friends,
After investigating a bit here and there I find out because scriptErrorSentToBrowser by default is false in IIS7 so we are unable to get the proper error message. We need to change the default value(false) to true for the scriptErrorSentToBrowser flag in IIS7. Here is how to change it -
Open your cmd prompt "As Administrator" and run the following command -
now you'll be able to see the proper error message. I would suggest you to set the flag to false after debugging because sometimes it shows very critical imp details to end user that can be harmful. You can use the same command just replace the 'true' by 'false'
Happy knowledge sharing.. :)
If you have worked with Classic ASP with IIS5 or IIS6, that is easy to recognize the error occurred in code. IIS send the error information to client which show the file name, line no. and other information to understand where and what error occurred. But now a days if you use IIS7 and trying to publish your classic ASP web application in IIS7, you may see a message like -
An error occurred on the server when processing the URL. Please contact the system administrator
After investigating a bit here and there I find out because scriptErrorSentToBrowser by default is false in IIS7 so we are unable to get the proper error message. We need to change the default value(false) to true for the scriptErrorSentToBrowser flag in IIS7. Here is how to change it -
Open your cmd prompt "As Administrator" and run the following command -
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true
now you'll be able to see the proper error message. I would suggest you to set the flag to false after debugging because sometimes it shows very critical imp details to end user that can be harmful. You can use the same command just replace the 'true' by 'false'
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:false
Happy knowledge sharing.. :)
No comments:
Post a Comment