zoukankan      html  css  js  c++  java
  • WCF:调用方未由服务器进行身份验证

    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">
          <!--
                  部署时,应删除或替换下列标识元素,以反映
                  在其下运行部署服务的标识。删除之后,WCF 将
                  自动推导相应标识。
              -->
          <identity>
           <dns value="localhost"/>
          </identity>
         </endpoint>
         <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
        </service>
       </services>
       <behaviors>
        <serviceBehaviors>
         <behavior name="WcfService2.Service1Behavior">
          <!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false 并删除上面的元数据终结点-->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息-->
          <serviceDebug includeExceptionDetailInFaults="false"/>
         </behavior>
        </serviceBehaviors>
       </behaviors>
    </system.serviceModel>
    </configuration>

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

  • 相关阅读:
    我非要捅穿这 Neutron(三)架构分析与代码实现篇(基于 OpenStack Rocky)
    我非要捅穿这 Neutron(二)上层资源模型篇
    $('.one + div')选取class为one的下一个元素
    15分钟,教你用Python爬网站数据,并用BI可视化分析!
    $("div span")选取里的所有的元素
    根据给定的元素名匹配元素
    根据给定的类名匹配元素
    根据给定的id匹配一个元素
    想创业,请问有没有投资小的项目?
    Vue组件间的通信
  • 原文地址:https://www.cnblogs.com/059212315/p/2310845.html
Copyright © 2011-2022 走看看