WCF Callback Service with netTcp Binding timeout after 10 mins

后端 未结 2 999
野的像风
野的像风 2021-01-19 02:19

I\'m creating a chat application with WCF(using callback contract) and netTcpBinding. I\'m hosting the service as a windows service and accessing it from other computers v

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-19 02:52

    The timeout in this case is defined by both receiveTimeout in the binding and inactivityTimeout in reliable session which is used for duplex messaging. The correct solution is not increasing timeout but implementing some ping / keep alive messages. The reason is that increasing timeout will keep connections open for failed clients.

提交回复
热议问题