1.在服务器端的web.config内(<system.serviceModel>节点下)加入以下节点内容:
<bindings>
<wsHttpBinding>
<binding name="NoneSecurity" maxBufferPoolSize="12000000" maxReceivedMessageSize="12000000" useDefaultWebProxy="false">
<readerQuotas maxStringContentLength="12000000" maxArrayLength="12000000" />
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<services>
2.在endpoint节点内增加 bindingConfiguration="NoneSecurity"
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="NoneSecurity" contract="我的连接名称">
3.在VS端的app.config 中的binding节点改写成如下:
<binding name="WSHttpBinding_IService我的连接名称"">
<security mode="None" />
</binding>