How to set keep alive interval for HTTP connection in WCF

后端 未结 6 1179
一向
一向 2020-12-03 03:45

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

6条回答
  •  天命终不由人
    2020-12-03 04:00

    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?

提交回复
热议问题