Web Service calls failing after 5 minutes

  • Thread starter Thread starter TonyB
  • Start date Start date
T

TonyB

We are calling a webservice running under SSL with a request that takes
quite a while (8-12 mins) to return. This has been running fine on my
desktop machine for some time now, but when the code is deployed to the
live server, it fails after 300 seconds (5 minutes), with an error
message:

"System.Net.WebException: The underlying connection was closed: Could
not establish secure channel for SSL/TLS. ---> System.IO.IOException:
Unable to read data from the transport connection. --->
System.IO.IOException: Unable to read data from the transport
connection. ---> System.Net.Sockets.SocketException: An existing
connection was forcibly closed by the remote host"

On my machine and testing the same appears to happen after a period of
15 minutes (which is long enough that the call returns).

The actual software being executed is identical on all 3 boxes, I have
checked the machine.config file, but nothing here about timeouts.

Technical support insist that the firewall would not be responsible.

So I am at a loss to explain what is happening, or even what to try
next. One thing which is different between the two 15 minute systems
and the 5 minute system is that the live box is hosted by an external
organisation, who inevitably have their own firewalls in place around
it.

Has anybody any ideas what might be causing this?

Many thanks,
Tony
 
TonyB said:
We are calling a webservice running under SSL with a request that takes
quite a while (8-12 mins) to return. This has been running fine on my
desktop machine for some time now, but when the code is deployed to the
live server, it fails after 300 seconds (5 minutes), with an error
message:

"System.Net.WebException: The underlying connection was closed: Could
not establish secure channel for SSL/TLS. ---> System.IO.IOException:
Unable to read data from the transport connection. --->
System.IO.IOException: Unable to read data from the transport
connection. ---> System.Net.Sockets.SocketException: An existing
connection was forcibly closed by the remote host"

On my machine and testing the same appears to happen after a period of
15 minutes (which is long enough that the call returns).

The actual software being executed is identical on all 3 boxes, I have
checked the machine.config file, but nothing here about timeouts.

Technical support insist that the firewall would not be responsible.

So I am at a loss to explain what is happening, or even what to try
next. One thing which is different between the two 15 minute systems
and the 5 minute system is that the live box is hosted by an external
organisation, who inevitably have their own firewalls in place around
it.

Has anybody any ideas what might be causing this?

You might need to tweak the executionTimeout attribute of the httpRuntime
element in your web.config file. See
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx for more information.
 
A firewall most certainly *could* cause this problem, especially if it
is running NAT. All NAT gateways have a timeout for outgoing
connections. Otherwise, they would quickly run out of resources.

That aside, have you tried playing with the "Timeout" property of your
web reference?
 
We're investigating the NAT possibility - that is if Mistral can give
us this info!

The web reference timeout is set to 2h.

Many thanks,

Tony
 
Back
Top