multiple instance accessing webservices giving error

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


x1877Asked:
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.

PockyMasterCommented:
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
x1877Author Commented:
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
PockyMasterCommented:
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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

x1877Author Commented:
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
PockyMasterCommented:
So, if you want it like that, open/close your database in your webservice method
0

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
x1877Author Commented:
i made the connection object private
0
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
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.