WCF获取证书编码值 [英] WCF obtaining certificate encoded value

查看:290
本文介绍了WCF获取证书编码值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用我的WCF服务的证书,所以在web.Config中有一个编码的值

 < identity& 
< certificate encodedValue =large string !!!!!!! />
< / identity>

这个值是Visual studio在开发中使用我的测试证书生成的。



现在我正在部署我想获得由管理服务器的第三部分维护的证书的编码值。



我知道使用svcutil.exe工具如下将给我这个。

  svcutil.exe http://servicename.svc 
我想知道的是



  1. 有任何方法可以做到这一点,我缺少

编辑: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

  1. Is this the recommended approach
  2. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆