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

时间:2015-03-30 15:59:51   收藏:0   阅读:5133

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!