2011-11-10 20 views
0

我需要使用SSL來保護我的WCF服務。我遇到的問題是這是一個WCF工作流服務,我似乎無法覆蓋它在幕後設置的默認綁定。如何爲WCF工作流服務添加利用SSL的綁定和端點?

一定有什麼東西我失蹤的配置文件中,因爲無論我做什麼,綁定總是回來爲:BasicHttpBinding_IService地址:http://myurl.com/biz/MyService.xamlx

它應該是:https://myurl.com/biz/MyService.xamlx

這些都是綁定和端點部分:

<bindings> 
    <basicHttpBinding> 
    <binding name="basicBinding"> 
     <security mode="Transport"> 
     <transport clientCredentialType="None" /> 
     </security> 
    </binding> 
    </basicHttpBinding> 
</bindings> 
<services> 
    <service name="MyNamespace.MyService"> 
    <endpoint address="https://myurl.com/biz/MyService.xamlx" 
       binding="basicHttpBinding" 
       bindingConfiguration="basicBinding" 
       contract="IService" /> 
    </service> 
</services> 

感謝您的幫助!

回答

0

有幾件事情嘗試:

  • 變化結合的wsHttpBinding,這將迫使SSL。

  • 將clientCredentialType更改爲證書。

  • 使用這個例子,並設置httpsGetEnabled爲true:

http://blog.adnanmasood.com/2008/07/16/https-with-basichttpbinding-note-to-self/

+0

感謝您的答覆。我嘗試了這些建議,不幸的是他們都沒有工作。但是,我終於得到了解決方案。我會盡快將它作爲答案發布。 – Shane