Reputation: 45
I have a windows application (actually an Outlook addin) that calls an asmx web service (yes, it's legacy, but the company is reluctant to move away from it & re-develop everything...) to get some data. The return value is a DataTable. I am calling the web service by adding is as a web service reference.
This has been working correctly for all clients, but recently one client reported an issue where calling the web service throws the following errors (on two separate calls):
Exception Type: InvalidOperationException
Exception Message: There is an error in XML document (23, 93530).
Inner Ex Type: IOException
Inner Ex Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
StackTrace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at
Exception Type: InvalidOperationException
Exception Message: There is an error in XML document (4426, 32).
Inner Ex Type: IOException
Inner Ex Message: The operation has timed out.
StackTrace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at
I am able to rule out that my application is generating the timeout as I am setting the web service class' TimeOut property to 2hrs before the call, and the next request has come through to the server in about 20-30 minutes.
Going through the IIS log, all the requests that have failed for the client have a http status of 200, but also a win32-status of 995.
I have been trying to replicate this error and get the reason why it is occurring without any success for the better part of the last 3 days (I need to find the exact reason - company policy :( :P). I need to know why this occurs and what is the solution or best work-around for this issue.
I have also posted this on the MSDN forum here
Can anyone help me with this? Any help is greatly appreciated. Thanks!
Cheers!
Upvotes: 0
Views: 1666
Reputation: 2405
you need to check to see if your hitting a connection limit ask the servers closing it as the other party to check web.config
<system.net>
<connectionManagement>
<add address="*" maxconnection="40"/>
</connectionManagement>
</system.net>
Upvotes: -1