首页 > Web开发 > 详细

WCF--找不到具有绑定 BasicHttpBinding 的终结点的与方案 https 匹配的基址。注册的基址方案是 [http]。

时间:2018-01-19 22:51:00      阅读:1545      评论:0      收藏:0      [点我收藏+]
  <system.serviceModel>
    <services>
      <service name="xxxxx.xxxxxx">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="aHttpBinding" contract="xxxxx.xxxxxx" name="xxxxx.xxxxx"></endpoint>
      </service>
    </services>
    <bindings>
      <basicHttpBinding>

        <binding name="aHttpBinding" maxReceivedMessageSize="1000000">
          <readerQuotas maxStringContentLength="1000000" />
          <security mode="Transport"> <!---------------------------------------------此处改为None----------------------->
          <transport clientCredentialType="None"/> 
        </security> 
        </binding>

      </basicHttpBinding>
    </bindings>

    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false -->
          <serviceMetadata httpsGetEnabled="false" />
          <!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息 -->
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

原因不知道为什么,把mode改为None就可以

WCF--找不到具有绑定 BasicHttpBinding 的终结点的与方案 https 匹配的基址。注册的基址方案是 [http]。

原文:https://www.cnblogs.com/25miao/p/8319077.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!