Http transport channel in WCF uses persistent HTTP connections by default. How to control keep alive timeout for those connections? Default value is 100s. I found that value by monitoring application in Procmon. I haven't found any setting in http transport binding element which configures this timeout. Is there any .NET class which can control that timeout?
Take a look here:
http://web.archive.org/web/20080721055556/http://blog.magenic.com/blogs/jons/archive/2007/05/04/The-Tao-of-Microsoft-WCF-CustomBinding-Configuration-Elements.aspx
There is a detailed discussion of manipulating the keep alive property during an http connection.
I found the solution for this. The problem is that the underlying kernel http.sys has it's own timeout and it will break the connection.
http://mmmreddy.wordpress.com/2013/07/11/wcf-use-of-http-transport-sharing-persistent-tcp-sessions/
netsh http add timeout timeouttype=idleconnectiontimeout value=120
Also, this question is similar to this What 130 second timeout is killig my WCF streaming service call?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With