2009-08-28 18 views
0

我想通過WebHttpBinding和SecurityMode:transport(SSL)公開實施合同。在傳輸中使用WebHttpBinding時,連接中斷安全模式

然而,當我嘗試訪問通過Firefox瀏覽器的網站,我只得到

,而該頁面被加載到本地主機的連接被中斷。

的配置文件如下:

<configuration> 
    <system.serviceModel> 
    <services> 
     <service name="MyService"> 
     <endpoint address="https://localhost" 
        binding="webHttpBinding" 
        contract="MyService" 
        bindingConfiguration="secureWebHttp"> 
     </endpoint> 
     </service> 
    </services> 
    <bindings> 
     <webHttpBinding> 
     <binding name="secureWebHttp"> 
      <security mode="Transport"/> 
     </binding> 
     </webHttpBinding> 
    </bindings> 
    </system.serviceModel> 
</configuration> 

回答

1

如果IIS中的主機,你需要配置託管網站的安全性在這種情況下使用端口443上的SSL證書。

您還需要配置服務行爲以設置證書名稱和存儲。特別是在將wcf服務作爲Windows服務託管時,需要爲您要使用的端口設置證書。例如vista中的httpcfg.exe或netsh。

結帳MSDN Configuring HTTP and HTTPS

相關問題