ASP 0147 - 500 Server error

What I have is this:

A script, which uses a VBScript class to retrieve data from the DB using ADO, and uses these returned recordsets to create XML output (instead of HTML). No other ActiveX objects are used in this script, it's pretty basic.
This script can generate 3 different 'xml files' depending on given querystring parameters.

I've got another script which uses the ServerXMLHTTP object to retrieve that XML and displays it on screen.
This retrieves sequentially the 3 possible results from the first script.

The problem:

The XML generating ASP script sometimes generates an  "ASP 0147 - 500 Server error" (<= taken from IIS logfile).
There are no bugs in my script causing errors since I can call the script without errors when I manually use the exact same URL I've used from the second ASP to retrieve the data with XMLHTTP.
Script error would also indicate a linenumber, which is not the case.



What is causing the ASP 0147 Server error ?
The error message itself is very obscure, since it doesn't specify any possible cause of the error.
In most cases script error either come from VBScript (eg. Syntax error), or OLEDB (invalid SQL statements etc), but in this case I don't have a clue what's causing the problem.

Is there a way to find out what exactly is going wrong?

Extract from IIS log:, -, 2/06/2003, 16:51:54, W3SVC1, webserver,, 3600647, 250, 179, 500, 0, GET, /foo/bar/prcchkxml.asp, TxtList=ARTICLE&IdtArticle=1586442000&IdtLanguage=NL|-|ASP_0147|500_Server_Error,

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

"There are no bugs in my script" - a bit of a bold statement ;)

First and foremost have you got "Friendly errors" turned off on your browser, your browser may be hiding a useful bit of information from you

Here are a few things that might help:;en-us;309051
newjackAuthor Commented:

I know it's quite bold to say my script doesn't have any bugs, but I mean that since I don't get any specific Scripterrors, the problem can't be caused by a mistake I made in my code :)

Friendly error messages is turned off yes, but the problem is I never seem to be getting the error when I manually run the script.
I only get it when it's called from the other script using XMLHTTP, and only now and then.

What I did now to test things further is added a number of Response.AppendLog "Cx" (x=number) statements as checkpoint in the problem-script, to figure out if there is any particular code that makes that script hang on IIS.
I have 5 checkpoints in total.

When I check the logs now I see this when things go as they should:

  200, 0, GET, /foo/bar/prcchkxml.asp, TxtList=PRODLIST&IdtCampaign=998C0C1C2C3C4C5,

When things go wrong I get this:

  500, 0, GET, /intrastore/pricechecker/prcchkxml.asp, TxtList=PRODLIST&IdtCampaign=144|-|ASP_0147|500_Server_Error,

No checkpoints at all here, so there must be something going REALLY wrong there.
Checkpoint Zero (C0) is positioned directly after the first Option Explicit line, before any includes, so since this doesn't even show up in the logfile it looks like no code is executed at all!

I find this quite scary...

newjackAuthor Commented:
edit: since I was changing my code while typing the previous reply, I added the C0 checkpoint, so I have 6 checkpoints in total :)
newjackAuthor Commented:
This usenet post explains what might be the problem:


When ASP is about to execute a request after it pulls it from the queue, it
checks to
see if the connection is still around. If it isn't, then ASP logs the error
in the event log.

The best way to get rid of this error is to improve your server's
performance, along with tuning your ASP pages.  I would recommend reading:

and ensure your web applications follow those guidelines.

-- end quote --

I've seen that performance tuning page before, and use most of the tips,
but one of them was refering to sessionstate for an application, and the posibility of disabling it for a single page.

In this app, I am using the session object, but it's not necessary to use it in the page generating the XML.
After disabling the Sessionstate in the asp script, the problem seems to have stopped, or at least it doesn't occur quite as frequently anymore as it did before.

So it looks like the main problem is server performance, as it's not able to process the multiple requests because of the extra hassle of (probably) creating a new session object at each XMLHTTP call from the other ASP script.

I don't think XMLHTTP uses cookies (allowing IIS to store the session-variables) which probably forces it to create a new session at each call, which does take some take, and which could end up choking the server in the end.

Now, how do I give point to myself? :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question.

RECOMMENDATION: PAQ/Refund this question. Go to this link ( and request for PAQ/Refund to the moderators.

Please leave any comments here within seven days.



EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.