tags:

views:

852

answers:

4

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

+1  A: 

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

alex
Thank you for the suggestion... I should have gone into more detail. I have posted an update to my question.
Jason Whitehorn
A: 

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.

Wayne M
I appreciate the suggestion, however "Show friendly HTTP error messages" wouldn't help as I have already verified the lack of information via Firefox and Chrome which do not "dumd down" the error messages.
Jason Whitehorn
Hmm that's odd--oh well, sorry I cannot be of more help then :)
Wayne M
+3  A: 

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?

Notorious2tall
yup, that's pretty much the next step. Oh, how i miss the days of classic ASP, haha!
alex
@alex: Somehow I missed those days... only to be leaning Classic ASP for the first time in 2009... lol.
Jason Whitehorn
The good old days of being able to edit live code on the fly...quick to get things done, but easy to shoot your foot. :)
Notorious2tall
@Notorious2tall: Per your suggestion i've added the "On Error resume next" statement to the top of default.asp. But that does not seem to change the behavior any, I still see the generic 500 error message page.
Jason Whitehorn
Did you check the Web Server extensions and Allow ASP? Another option is to start commenting out code and then adding it back line by line. Not a fun option, but it'll get the job done.
Notorious2tall
In regards to if "Active Server Pages" are set to allowed: I'm not 100% positive what you are asking, but I do know that the ".asp" extension is mapped and that the Execute permissions are "Scripts only".
Jason Whitehorn
In IIS Manager, there's a section called Web Server Extensions. I believe it was adding in IIS6. It's part of MS's everything is turned off first initiative in IIS. You have to specifically allow .asp pages to run in IIS.
Notorious2tall
Opps, it's called Web SERVICE Extensions.
Notorious2tall
Ah! I see the tab now... yes that is enabled. It is probably worth pointing out that this dev. environment successfully hosts other Classic ASP (and some ASP.NET) applications.
Jason Whitehorn
Well, it looks like ASP.NET has spoiled me on its debugging toolset. I am just going to accept that I will have to rip this apart old-school to find the problem. Thanks for all your help.
Jason Whitehorn
A: 

If you have a global.asa file in your web directory, you could rename the file and try loading the favicon.ico file again. If it loads, the problem lies within the global.asa