Windows时间更改后连接超时

时间:2016-01-20 11:14:58

标签: c# wcf

我在程序中使用DuplexChannelFactory<>.CreateChannel来创建服务器和客户端之间的连接。但是,当我改变操作系统时,我的程序引发了异常。

System.ServiceModel.CommunicationObjectAbortedException: 
The operation 'Ping' could not be completed because the sessionful channel timed out waiting to receive a message.  
To increase the timeout, either set the receiveTimeout property on the binding in your configuration file,
or set the ReceiveTimeout property on the Binding directly.

如何在更改Windows上的时间后避免此异常?

PS。我不应该设置无限超时,因为我需要处理丢失的连接。

0 个答案:

没有答案
相关问题