协定需要双工,但是绑定“WSHttpBinding”不支持它或者因配置不正确而无法支持它
以下两种情况,我都遇到过。
一,
< endpoint address ="" binding="wsHttpBinding" contract="异步.IService1">中的wsHttpBinding改为wsDualHttpBinding,客户端重新更新服务器引用即可
二,app.config
在<system.serviceModel></system.serviceModel>之间加上
<protocolMapping>
<add scheme="http" binding="wsHttpBinding" bindingConfiguration="WsHttpSession"/>
</protocolMapping>
以下两种情况,我都遇到过。
一,
< endpoint address ="" binding="wsHttpBinding" contract="异步.IService1">中的wsHttpBinding改为wsDualHttpBinding,客户端重新更新服务器引用即可
二,app.config
在<system.serviceModel></system.serviceModel>之间加上
<protocolMapping>
<add scheme="http" binding="wsHttpBinding" bindingConfiguration="WsHttpSession"/>
</protocolMapping>

本文介绍了解决WSHttpBinding不支持双工的问题的方法,包括将WSHttpBinding替换为wsDualHttpBinding以及通过配置app.config文件来实现支持。
464

被折叠的 条评论
为什么被折叠?



