码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2018-01-19 23:31:46      阅读:1712      评论:0      收藏:0      [点我收藏+]

标签:transport   uri   rac   找不到   终结点   als   详细   type   异常   

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

标签:transport   uri   rac   找不到   终结点   als   详细   type   异常   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!