2012-09-12 40 views
1

我在這個夢幻般的網站的新成員,這是我的第一個問題在這裏.. 我希望我可以找到解決辦法..保護和簽名消息在WCF

我建立一個網站,我需要保護客戶端和服務器之間的通信。

我應該在實現中使用WCF。

我的項目要求:

  • 使用WCF
  • 結合:ws2007HttpBinding
  • 安全:HTTPS
  • 客戶端:登錄

我應該使用HTTPS確保通信和我應該讓客戶簽署消息(這很重要)。

我在服務器和客戶端都安裝了證書但我不知道如何讓客戶端簽署消息。

我不能在wcf中使用消息安全性,因爲我需要HTTPS。任何人都可以幫助我知道什麼是TransportWithMessageCredential用於簽名以及如何實現這樣的事情?

這裏是服務器的app.config的一部分:

<bindings> 
    <ws2007HttpBinding> 
     <binding name="ServiceWS2007HttpBindingConfg"> 
      <security mode="TransportWithMessageCredential"> 
       <transport clientCredentialType="None" /> 
       <message clientCredentialType="Certificate" negotiateServiceCredential="false" /> 
      </security> 
     </binding> 
    </ws2007HttpBinding> 
</bindings> 
<services> 
    <service name="Service"> 
     <endpoint address="https://MAHER-PC/EBPP/Service.svc" binding="ws2007HttpBinding" 
     bindingConfiguration="ServiceWS2007HttpBindingConfg" contract="IService" /> 
    </service> 
</services> 

感謝....

回答