We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Random ASP 0241 Error

eugoogley
eugoogley asked
on
Medium Priority
1,096 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

Comment
Watch Question

Author, Web Developer
CERTIFIED EXPERT
Top Expert 2009
Commented:
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?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:

Author

Commented:
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
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:
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

Author

Commented:
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.
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:
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
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:
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?

Author

Commented:
My apologies - this is the first time for me. How do i change the grade?
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:
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

Author

Commented:
Many thanks
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:
anytime
Have a good one.

Carrzkiss
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.