IIS 6.0, Classic ASP Detailed Error Message

2020-07-07 11:43发布

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

2条回答
贼婆χ
2楼-- · 2020-07-07 12:23

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
查看更多
爱情/是我丢掉的垃圾
3楼-- · 2020-07-07 12:26

this is what you need for long time purpose - http://www.reedolsen.com/show-errors-for-classic-asp-pages-in-iis-6/

or for short term you can use what above has been posted.

查看更多
登录 后发表回答