代码改变世界

[WCF]配置文件中Certificate 的encodeValue怎么设置?

2010-06-04 13:55  轩脉刃  阅读(1033)  评论(1编辑  收藏  举报

在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值

 

 

也可以看下面的链接:

http://stackoverflow.com/questions/1199525/wcf-obtaining-certificate-encoded-value