通信对象System.ServiceModel.Channels.ServiceChannel 无法用于通信,因为其处于“出错”状态。

问题描述:在客户端站点访问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>

 

posted @ 2015-03-30 15:36  J.Y  阅读(5761)  评论(0编辑  收藏  举报