WCF:调用方未由服务器进行身份验证

服务器webconfig端配置文件,红色部分为添加部分

<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>    

<service name="WcfService2.Service1" behaviorConfiguration="WcfService2.Service1Behavior">     

<!-- Service Endpoints -->     

<endpoint address="" binding="wsHttpBinding" bindingConfiguration="NoneSecurity" contract="WcfService2.IService1">      

------------------------------------------

客户端将security配置改为<security mode="None"/>

原文地址:https://www.cnblogs.com/jiewei915/p/2875074.html