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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM