天天看點

[WCF]配置檔案中Certificate 的encodeValue怎麼設定?

在wcf配置檔案中經常會出現這樣的屬性:

<identity>

<certificate encodedvalue="large string!!!!!!!" />

</identity>

那麼這其中的encodedvalue如何設定?

1.把cer檔案(證書)導出為base64格式

  a,使用mmc找到需要的證書  -- (add snap-in)

  b,右擊證書  導出

    c,base64 encoded x509(.cer)

2.用notepad打開得到encodedvalue值

也可以看下面的連結:

<a href="http://stackoverflow.com/questions/1199525/wcf-obtaining-certificate-encoded-value">http://stackoverflow.com/questions/1199525/wcf-obtaining-certificate-encoded-value</a>