IIS 6.0, Classic ASP Detailed Error Message

怎甘沉沦 提交于 2019-12-09 16:24:25

问题


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


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/9953198/iis-6-0-classic-asp-detailed-error-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!