I have strict timeout requirements for my WCF client proxy. At the moment I set all my basicHttpBinding timeouts (Open, Close, Send, and Receive) to 1 second. However, when there’s a connection break between my client and the service, it always takes around 21-22 seconds before the timeoute occurs.
I considered that it might be a slow / failing DNS lookup, but by substituting the hostname in the endpoint URL with an IP address had no effect.
Is this the expected behaviour? Should I manage these timeouts requirements myself with something such as application timers?
The answers to this SO question explain why you experience this.
You will need to implement a timeout yourself if it is important to you unless/until Microsoft can be persuaded to change the WCF implementation.