WCF--找不到具備綁定 BasicHttpBinding 的終結點的與方案 https 匹配的基址。註冊的基址方案是 [http]。

<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就能夠spa

相關文章
相關標籤/搜索