ASP.NET Concurrent users of Webservice causing overlapping results

In the interest of setting the right foundation for communication it's important to realize that my software designs skills/understanding are intermediate and do have limitations. That having been said I will describe my situation.

Basic Description & Developement Environment:
I have designed an ASP.NET (.NET Framework 4.x) webservice using Visual Studio 2010 that receives an xml document through a SOAP call made by the end user. The XML is then processed by 10-15 different classes. These classes retrieve data from 3rd party information providers, credit bureaus, OFAC repositories ect.... and subsequently parse the results. The final process simply constructs an XML document of the results and returns it to the end user.

The Problem:
Occassionally when two users make requests at the same time their XML results become "mixed". That is to say that user A may have data contained in the XML that belongs to the request of user B. It appears to be random and not consistently repeatable.

My Hypothesis:
My inital thought was that I have not properly designed the classes to be thread safe/isolated however after much code review I don't believe that to be the case. Unfortunately all my attemps (limited knowledge not withstanding) to correct the problem failed and consequently I am stuck.
RobFarleyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Roopesh ReddyIT AnalystCommented:
Hi,

You can lock the calls to Web Service like this - http://weblogs.asp.net/joelvarty/archive/2009/02/19/lock-your-web-app-to-1-outgoing-web-service-call-across-all-threads.aspx

OR

In the web.config set this -

<system.net>
    <connectionManagement>
      <add address="*" maxconnection="2"/>
    </connectionManagement>
  </system.net>

Open in new window


you can also try this -

<ProcessModel>
  <autoconfig = "true">
</ProcessModel>

Open in new window


Hope it helps u...
0
RobFarleyAuthor Commented:
Thanks for your reply. AM I correct in saying that by making these adjustments to the web.config file as shown above I would essentially "serialize" the web service so that only one request is processed at a time?

If this is the case does this process create a "virtual queue" for all requests that try to access the service WHILE the preceeding call is still being processed? Or..... will subsequent requests need to repeatidly call the web service until the preceeding call has completed?
0
Roopesh ReddyIT AnalystCommented:
Hi,

It's supposed to work that way! Once the process in running, other requests will be waiting until the first one finishes!

Hope it helps u...
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
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
ASP.NET

From novice to tech pro — start learning today.