通信对象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>

 

文章来自:http://www.cnblogs.com/yf2011/p/4378229.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3