2009-09-10 151 views

回答

2

您必須設置

<transport clientCredentialType="Certificate" /> 
在服務的conf

,告訴WCF的crendential由客戶端證書提供。

,並設置messageEncoding = 「MTOM」

<wsHttpBinding> 
<binding name="wshttpconfig" messageEncoding="Mtom"> 
      <readerQuotas maxArrayLength="64000" /> 
      <security mode="Transport"> 
      <transport clientCredentialType="Certificate" /> 
      </security> 
</binding> 
</wsHttpBinding> 

看到這個鏈接

An easy way to use certificates for WCF security

Configuring WCF for client certificate authentication

Using Certificate-based Authentication and Protection with Windows Communication Foundation (WCF)

再見。