views:

1454

answers:

5

I have read pretty much EVERY blog post, article and help document published regarding this problem and they have not helped. The most common suggestions are:

  1. Internet Explorer -> Tools Menu -> Internet Options -> Advanced -> Show Friendly Error Messages (make sure this is NOT ticked)

  2. IIS -> Home Directory tab -> Configuration... -> Debugging tab -> Send Detailed ASP Error message to the client (make sure this is selected)

Neither of these work and I have a feeling it has to do with Plesks management of IIS. Is there ANY way to see what these Internal Server Errors are? Even if it means browsing around the server for log files?

+1  A: 

An idea spurred on by Agent_9191:

At the top of the page put:

On Error Resume Next

And at the bottom of the page put:

If Err.Number <> 0 Then Response.Write(Err.Description)

Any other ideas on debugging direct from IIS without changing page code?

Jimbo
A: 

Another LEGENDARY page for ASP Classic developers (using IIS 7.0 though) is here:

http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx

Jimbo
A: 

"If" you have the ability to chance your custom 500 error page then you can catch the error using a call to Server.GetLastError which will give you all the details (well most of them) which should allow you to start debugging it on live.

http://www.w3schools.com/ASP/asp%5Fref%5Ferror.asp

Can you not recreate the problem locally?

Pete Duncanson
+1  A: 

The class_terminate event can be used to create a global error handler without touching the iis config. When ASP encounters an error it server.execute's the configured 500 handler and then return to the orginal script to clean up all remaining objects.

This offers you an opportunity to create a global debugger object and use the class_terminate event to handle the errors (eg print out debug info).

Eg:

class cDebugger
    private sub class_terminate
        if err then
            response.clear
            dim asp_error
            set asp_error = server.getLastError()
            response.write asp_error.description
            ...
            ...
        end if
    end sub
end class
set [_debugger] = new cDebugger
Joost Moesker
This sounds like a great option, where would this code go? Thanks
Jimbo
Put it in an include and add this file to every page you want to debug.
Joost Moesker
+1  A: 

The following applies to Plesk only.

Proceed to your domain in Plesk control panel and turn off "Custom Error Documents" under "Physical hosting setup". This will send error message directly to the browser.

You can also find error messages in log file directory yourdomain.com\statistics\logs\W3SVCXXXX

Sergey Kornilov