Stefan

Stefan

  • NA
  • 2
  • 1.6k

SOAP WS timing out after only 20 seconds, but not in browser

Aug 10 2017 2:33 PM
Hi all, I am running into this issue with one of my web service calls.
 
We have an ASP.NET SOAP web service deployed on a server remotely. Everything works just fine. A few days ago we decided to deploy the exact same web service to a second server in a different location. The problem is, the exact same code on both the web service and client, fails when calling the web service on server #2, EXACTLY after 20 seconds, with the following error:
 
"The request channel timed out while waiting for a reply after 00:02:59.9111286. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."
Inner exception:
 
The HTTP request to 'http://-------------.asmx' has exceeded the allotted timeout of 00:02:59.9960000. The time allotted to this operation may have been a portion of a longer timeout.
 
Inner exception:
The request was aborted: The operation has timed out.
 
As you can see from the exception details, the timeout is set to 3 minutes but the exception is raised exactly after 20 seconds from the call, which leads me to believe that for some reason the server is the one dropping the connection. Also calling the web service test page (the one served by IIS when accessing directly the asmx page) works just fine from a browser, with the response for a method being instantaneous.
 
I have analyzed the browser request headers and duplicated them in the code but no luck. Also that would not explain how one server works and one doesn't. The client is the same and I also called the web service on the two servers sequentially just to confirm that the call is exactly the same. One works, one doesn't.
 
Any suggestions would be greatly appreciated.
 
Also please let me know if more information is needed to figure this out.

Answers (1)