2014-10-28 48 views
1

我已經在wsHttpBinding的配置文件中完成了下面的配置並且具有傳輸安全性。元數據交換,基址爲&的綁定全部都是爲Https設置的,但它仍然給這個問題。無法找到與具有綁定WSHttpBinding的端點匹配scheme https的基地址。註冊的基地址方案是[http]。

<system.serviceModel>  
    <bindings>  
    <wsHttpBinding> 
      <binding name="WsHttpEndpointBinding"> 
       <security mode="Transport"> 
        <transport clientCredentialType="None"/> 
       </security> 
      </binding> 
     </wsHttpBinding> 
    </bindings> 
    <services> 
     <service behaviorConfiguration="WCFWindowsBasicHttpBinding.Service1Behavior" name="WCFWindowsBasicHttpBinding.Service1"> 
      <endpoint address="" binding="wsHttpBinding" bindingConfiguration="WsHttpEndpointBinding" name="WsHttpEndpoint" contract="WCFWindowsBasicHttpBinding.IService1"> 
       <identity> 
        <dns value="localhost"/> 
       </identity> 
      </endpoint> 

    <endpoint address="Mex" binding="mexHttpsBinding" contract="IMex"></endpoint> 

    <host> 
     <baseAddresses> 
     <add baseAddress="https://localhost/Service1.svc"/> 
     </baseAddresses> 
    </host> 

     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
      <behavior name="WCFWindowsBasicHttpBinding.Service1Behavior"> 
       <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
       <serviceMetadata httpGetEnabled="false" /> 
       <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
       <serviceDebug includeExceptionDetailInFaults="false"/> 
      </behavior> 
     </serviceBehaviors> 
    </behaviors> 
</system.serviceModel> 
+0

你試過沒有ssl嗎? – Kiquenet 2015-01-27 14:54:20

回答

1

您是否在IIS上託管服務?如果是這樣,請確保您正在部署的WebSite具有在IIS中定義的SSL綁定。

+0

用於創建ServiceHost的代碼看起來像什麼? – tomasr 2014-10-28 16:51:01

+0

這是一個簡單的代碼,首先創建宿主環境,而不是隻是打開它,如果在https的情況下控制檯或Windows應用程序部署我們需要這樣加密我們自己? – user1149555 2014-10-29 06:20:24

相關問題