問題描述:在客戶端站點訪問WCF服務后,在頁面停留時間過長,客戶端站點將會報錯。報錯內容如下:
通信對象System.ServiceModel.Channels.ServiceChannel 無法用於通信,因為其處於“出錯”狀態。
在網上看到的處理方法:
receiveTimeout 盡可能的將值設置大,InactivityTimeout盡可能的要小。
參考內容:
https://social.msdn.microsoft.com/Forums/zh-CN/50454233-5870-49c2-8943-c0c02d558c6f/systemservicemodelchannelsservicechannel-?forum=wcfzhchs
http://blog.csdn.net/sweetwxh/article/details/6738650
<wsHttpBinding>
<binding name="wsBinding" maxReceivedMessageSize="900000000"
openTimeout="24:00:00" receiveTimeout="24:00:00"
sendTimeout="24:00:00" >
<security mode="Message">
<!--定義消息級安全性要求的類型,為證書-->
<message clientCredentialType="Certificate" />
</security>
</binding>
</wsHttpBinding>