IamIraqi Homepage
Forum Home Forum Home > Science, Technology, and Support > Sci/Tech Room > Tools and Tutorials
  New Posts New Posts RSS Feed - Classic ASP in IIS 7: Displaying Error Details
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Classic ASP in IIS 7: Displaying Error Details

 Post Reply Post Reply
Author
Message
Moh View Drop Down
Webmaster
Webmaster
Avatar
Site Creator | Administrator

Joined: 24 May 2006
Location: USA
Status: Offline
Points: 4166
Post Options Post Options   Thanks (0) Thanks(0)   Quote Moh Quote  Post ReplyReply Direct Link To This Post Topic: Classic ASP in IIS 7: Displaying Error Details
    Posted: 09 Nov 2010 at 7:45pm
Issue:
When running classic ASP files on IIS 7 (not sure if this applies to other script types), I got a few errors but they were very generic server-genertaed errors that didn't really display the actual error. For example, the error may display as: 
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
 
OR
 
An error occurred on the server when processing the URL. Please contact the system administrator
 
Cause:
In IIS 7, "scriptErrorSentToBrowser" flag is set to False. 
 
Solution:
This setting is actually a good thing, from a security stand point as it prevents malicious users from determing exactly what the error is or why it's occuring.
However, because you need to fix a website problem, you will need to "temporarily" change this setting to "true" so the actual error message gets sent to the browser, and so you can see it.
To do so, follow these steps:
  1. Open a command prompt with elevated access (A.K.A. run command prompt as administrator)
  2. Run the following command: %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

After doing the above, you should now be able to see the exact error message on the page in question. (If you don't, then make sure that you turn off "Show Friendly HTTP Error Messages" in your browser).

Important: Once you have determined the exact error message and took action to resolve it, it is recommended that you change the setting back to false, by running the command:
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:false


Follow IamIraqi on twitter: http://twitter.com/iamiraqi
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.105 seconds.