一个项目须要用到推送的功能,就是服务器主动推送数据给多台客户机。因而采用了WCF的双工通信netTcpBinding安全
写好的项目,在本机测试都没有问题。服务器
若是放在局域网内测试,问题出来了;先是安全性问题,后面就是 套接字链接已停止。。。。。。。。。。。这一串问题了;测试
安全性问题:spa
<netTcpBinding>
<binding name="NewBinding" maxReceivedMessageSize="2147483647" transferMode="Buffered">
<readerQuotas maxStringContentLength="2147483647" maxArrayLength="12000000"/>
<security mode="None">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</netTcpBinding>it
这样设置就能够了io
可对于 后面一个问题一直找资料都不行,找了不少资料,有的是说datatable没有加name,有的是说安全性问题,可我已经加了“<security mode="None">”这个了仍是不行;table
结果是由于少了一个配置属性:cli
<endpoint address="" binding="netTcpBinding" bindingConfiguration="NewBinding" contract="AssetWcfService.IMonitorLog">
</endpoint>配置
一加上去结果能够了。花了一个晚上的时间啊,真是坑爹啊。数据