Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

multiple instance accessing webservices giving error

Posted on 2006-03-26
7
Medium Priority
?
161 Views
Last Modified: 2010-04-24
i have a  vb.net application which is having a reference to a webservices which also i made.
its working fine.
but when i run multiple instance from different machines at same time it strats giving errors like this

"There is already an open datareader associated with this connection , which must be closed."

i dont understand why this is happending , according to my knowledge both should run as independent threads
How can i solve this issue?

Thanks


0
Comment
Question by:x1877
  • 3
  • 3
6 Comments
 
LVL 14

Expert Comment

by:PockyMaster
ID: 16292994
1 single opened connection can have just 1 open datareader. If you are to serve multiple readers you are needing multiple connections, or use a different approach.
0
 

Author Comment

by:x1877
ID: 16293506
how can i do this ? on webservice server its only having one connection object . how can i force it to take multiple instance of the connection object in case it is called from different instance?
0
 
LVL 14

Expert Comment

by:PockyMaster
ID: 16293685
I assume your connection object is located in your webservice.
You might try to keep your connection alive when needed often.
You might protect being called multiple times with mutexes, but I've never tried them in a webservice. Or you might create a connectionpool and use another connection, in case you're busy.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:x1877
ID: 16299847
what i want is each time this webservice method is called from different instance of client application, it should create entirly different connection objects, so that the threds will work with out problems. when its running alone the application is running fine.

0
 
LVL 14

Accepted Solution

by:
PockyMaster earned 2000 total points
ID: 16302648
So, if you want it like that, open/close your database in your webservice method
0
 

Author Comment

by:x1877
ID: 16494993
i made the connection object private
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Loops Section Overview
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…

564 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