WCF获取证书编码值 [英] WCF obtaining certificate encoded value
问题描述
我使用我的WCF服务的证书,所以在web.Config中有一个编码的值
< identity&
< certificate encodedValue =large string !!!!!!! />
< / identity>
这个值是Visual studio在开发中使用我的测试证书生成的。
现在我正在部署我想获得由管理服务器的第三部分维护的证书的编码值。
我知道使用svcutil.exe工具如下将给我这个。
svcutil.exe http://servicename.svc
$ p $ 我想知道的是
- 有任何方法可以做到这一点,我缺少
编辑:Visual Studio不可用,我无法移动证书,因此必须是非VS解决方案
解决方案可以通过将证书(通过IIS或证书管理单元)导出到没有以base64形式的私钥的.cer文件,然后在记事本中打开并将其复制并粘贴到encodedValue中来完成。
I am using a certificate with my WCF service so have an encoded value in the web.Config
<identity> <certificate encodedValue="large string!!!!!!!" /> </identity>
The value was generated by Visual studio in development using my test certificate.
Now I am deploying I want to get the encoded value for the certificate maintained by the third part who manage the server.
I know that using the svcutil.exe tool as follows will give me this.
svcutil.exe http://servicename.svc
What I want to know is
- Is this the recommended approach
- Are there any either ways to do this that I'm missing
EDIT: Visual Studio isn't available and I cant move the certificate so it will have to be a non VS solution
解决方案This can be done by exporting the certificate (via IIS or Certificate Snap In) to a .cer file without the private key in base64 form, then opening in notepad and copying and pasting this into encodedValue
这篇关于WCF获取证书编码值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!