WCF service aborts in seconds but timeout is '23:00:00'

36 Views Asked by At

I have a WCF service which is producing an error "socket connection was aborted" when connecting to a website from a remote machine (if I use localhost on the web server there is no issue). All the WCF timeouts are configured to "23:00:00" in the bindings, and the error message reports Local socket timeout was '23:00:00' (or sometimes things like '22:59:59.9999'). The thing is the error comes up after only a second or two. It is definitely not running for 23 hours before failing.

Why might this 23 hour timeout be being hit in only a few seconds? I thought perhaps some strange mismatch in date/time configured on the different machines but that would cause all sorts of other problems, no?

1

There are 1 best solutions below

0
QI You On

There are three common causes of timeout issues:

1.The development did not set a timeout, the system timeout after 10 minutes. (The default timeout time in WCF is 10 minutes.).

2.Exceeded the timeout time set by the developer.

3.The maximum number of connections accepted by WCF was rushed, and the customer did not close the connection well and hogged resources.

In fact, the reason may be that your client did not shut down properly when calling the service. Your invocation command at the client side can be used using try... catch. Or add the maximum number of connections to the WCF config file.