IIS 6.0, Classic ASP Detailed Error Message

asp-classiciis-6

I have a legacy classic asp site which is moved from IIS 7 to IIS 6. Unfortunately I am getting an error in my application but its not sending any detailed error information to the browser so I am not able to correct it. The Server throws an custom error message as follows;

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error. More information about this error may be available in the server error log.

how can i get a the error info as in IIS 5.5?
Thanks in advance

Best Answer

If you can't change the IIS error settings then simply let the asp-page print the error.

At the top of the file, set On Error Resume Next to allow the asp-script to continue executing despite any errors.

Then at the possible locations where you suspect error to occur OR just at the bottom of the page; put this code.

IF Err.Number <> 0 THEN
    Response.Write "=========================================" & "<br />"
    Response.Write "Error description: " & Err.Description     & "<br />"
    Response.Write "Source: " & Err.Source                     & "<br />"
    Response.Write "LineNumber: " & Err.Line                   & "<br />"
    Response.Write "=========================================" & "<br />"
END IF
Related Topic