Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Diagnosing HTTP 500 errors in Classic ASP

I have recently inherited a website written in Classic ASP, and am currently trying to get a sense of the state of things. The website is working in production, however the development environment (hosting on a Windows Server 2003 box) produces an HTTP 500 error when you try to navigate to it.

I realize that HTTP 500 errors just mean that an unexpected server error occurred, and that this also is more than likely the ASP code crashing for one reason or another. I have tried numerous browsers (IE, Firefox, and Chrome) but they all have the same amount of information.

Being primiarly an ASP.NET developer I am use to the yellow screen of death which can be configured to show a stack trace.

So my question is, how do I convince IIS and/or Classic ASP to give me a better hint about what is causing the error?

Update: I should have gone into more detail originally, but here are some of the things I've looked at.

  • I've looked at the event logs (Application, Security, System, etc) and there is nothing relevent there.

  • I have looked at the IIS access logs and I see the access attempts, and just 500 errors. It is even producing 500 errors on favicon.ico

like image 544
Jason Whitehorn Avatar asked Jan 20 '09 14:01

Jason Whitehorn


3 Answers

If you can't find the offending line by turning off "Show friendly HTTP error messages" as Wayne suggested, then try adding "On Error Resume Next" to the code along with response.write statements. I've found with problems like these, you just have to start going line by line through the code until you find the offensive code.

Just out of curiosity, is Active Server Pages set to allowed in the Web Server extensions in IIS on the dev servers?

like image 99
Notorious2tall Avatar answered Sep 28 '22 09:09

Notorious2tall


Have you checked the Application portion of the web server's Event Viewer for error entries?

like image 37
alex Avatar answered Sep 28 '22 09:09

alex


What alex said, also make sure that you turn off "Show friendly HTTP error messages" in Internet Explorer and then browse to the site; that tends to give you a more specific error message (although still generic compared to ASP.NET's stack trace) along with the line number.

like image 35
Wayne Molina Avatar answered Sep 28 '22 10:09

Wayne Molina