?
Solved

Random ASP 0241 Error

Posted on 2009-02-16
12
Medium Priority
?
887 Views
Last Modified: 2012-06-27
I have an intermittent error which appears on an IIS 6 Server running Windows 2003 R2 SP2. This is running an ASP application which receives fairly high usage. The error displayed to the client is:
Active Server Pages error 'ASP 0241'
CreateObject Exception
/myWebApplication/myScript.asp
The CreatObject of '(null)' caused exception C000005.

The object call which fails is the 'Server.CreateObject("ADODB.Recordset"). The error is always limited to the current user's session (no other user is affected at that moment) and restarting the web browser and reaccessing the page (creating a new session) will make the error disappear and the page works fine.

I have performed a large-scale cleanup of all code to ensure that there are no recordsets or connections which have not been closed. I also find that after this error has been reported, when logging into the server via remote desktop, I find immediately an error indicating "IIS Worker Process encountered an error and had to restart". Also, the event log contains the following error at a similar time:
Faulting application w3wp.exe, version 6.0.3790.3959, faulting module unknown, version 0.0.0.0, fault address 0x00390038.

Other information if relevant:
Application runs with its own process pooll. Worker processes are configured to recycle twice per day outside of production hours as opposed to a specified number of minutes or requests. Only 1 worker process in the web garden.

The below code is a simplified version of the code that is used when the error occurs:
' Presume that the connection, "myConn" has already been declared and successfully created.
dim myRS
myRS = Server.CreateObject("ADODB.Recordset")
myRS.Open "mySQLStoredProcedure @param1 = 'hello', @param2 = 'world'", myConn

Open in new window

0
Comment
Question by:eugoogley
  • 7
  • 4
11 Comments
 
LVL 31

Accepted Solution

by:
Wayne Barron earned 500 total points
ID: 23655842
Try this
myRS = Server.CreateObject("ADODB.Recordset")
Change To:
myRS = CreateObject("ADODB.Recordset")

I read that the Server. part is only needed in browsers lower then ie5
So, try it and see what happens?
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23655859
0
 

Author Comment

by:eugoogley
ID: 23656696
Hi carrzkiss
Thanks for your post - I had seen this as an option previously, but wasnt sure it was worth doing. Still I have made the change to our production system and tested an will wait and see if there is a positive impact which will probably take a week.
Thanks again
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23658139
Hope that it works.
I use to run the 2003 server back a few years ago, prior to the SP2 being released.
So I never experianced this type of issue.

Hope that it works.
Carrzkiss
0
 

Author Comment

by:eugoogley
ID: 23751126
Hi - removing the "Server." from the "CreateObject" call seems to have result in no new reports of the issue. When logging into the server, there are still IIS Worker processes errors and errors for COM+ in the event log, but these may be unrelated. It has been 10 days since we deployed the fix.
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23751251
I am unsure about the other errors.
But it seems that the main issue has hopefully been resolved.
Hope that it will keep it going.

Carrzkiss
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23842937
If doing what I suggested fixed the original issue, then you should have given a Grade [A]
Instead of a Grade [B].

Please explain why the [B] Grading?
0
 

Author Comment

by:eugoogley
ID: 23843325
My apologies - this is the first time for me. How do i change the grade?
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23844821
eugoogley:
No problem.
I submitted a Request, so it should be changed within the hour.

Have a good one and hope that your problems with the other issues are not a problem no more..

Carrzkiss
0
 

Author Closing Comment

by:eugoogley
ID: 31547614
Many thanks
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23852994
anytime
Have a good one.

Carrzkiss
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question