IIS 6.0, Classic ASP Detailed Error Message

12,436

Solution 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

Solution 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.

Share:
12,436
Libin TK
Author by

Libin TK

Updated on July 29, 2022

Comments

  • Libin TK
    Libin TK almost 2 years

    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

  • marifrahman
    marifrahman over 10 years
    hi @David I did use your way and got the error description saying overflow - but the line number is not showing - can you please let me know what else can I do to get the line number ?
  • yeya
    yeya about 6 years
    Dead link, It's better to copy the original answer here