0

I have a web application calling a webservice which is calling into a class that performs calculations. Within the class the performs calculations, it is essentially doing a. :

Dim MyDoc As XmlDocument
MyDoc = New XmlDocument
MyDoc.LoadXml(xmlString)

I do roughly 100 calls to this webservice concurrently. The majority of the time it works, but every once and a while I will get an error stating the error in the heading.

If I rerun the same call, it will work 99% of the time. (same data, same call)

In turn I am wondering if maybe I am trumping the calls on top of each other and maybe I need to dispose of something more appropriately. I have been trying to find a fix for this for quite some time, but have not been able to find anything that details this type of situation. I have looked at the data going in when it errors and it is the same as when it does not error.

1
  • 1
    It's very hard to give an answer to this question without seeing the code where you're making these calls to the web service. It's quite possible you're overloading the service's ability to respond.
    – Tim
    Commented Jun 26, 2013 at 20:01

1 Answer 1

1

This ended up being due to the fact that the class being called to was not able to handle taking on this number of calls concurrently. The solution was to rewrite it with using and dispose statements and threads so that it wasn't trumping itself.

1
  • I wonder if the threads were really necessary. Properly implementing IDisposable is usually enough. Threads, in fact, can be dangerous in the context of a web service. At best, they may be an unnecessary distraction. Commented Jul 24, 2013 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.