如何将证书部署到Azure中的“受信任的人”存储区? [英] How do I deploy a certificate to the Trusted People store in Azure?

查看:93
本文介绍了如何将证书部署到Azure中的“受信任的人”存储区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何才能将公共密钥证书部署到我的工作人员角色的受信任人员商店?

How can I get a public key certificate deployed to my Worker Role's Trusted People store?

我' m将 PeerTrust 用于WCF(Azure中的自托管TCP服务):

I'm using PeerTrust for WCF (self-hosted TCP services in Azure):

var creds = new ServiceCredentials();
creds.ClientCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.PeerTrust;

我知道如何在我的 .csdef 并在代码中。但是,我不知道如何获取 .cer 文件(没有私钥)并将其实际放入Azure以便可以将其用于PeerTrust。在线门户网站中的证书管理器仅允许您上传 .pfx 文件(即带有私钥的证书)。

I know how to reference the certificate both in my .csdef and in code. However, I don't know how to take a .cer file (with no private key) and actually get it into Azure so it can use it for PeerTrust. The Certificates manager in the online Portal only allow you to upload .pfx files (i.e. certificates with the private keys).

推荐答案

我只是在想,如果使用 System.Security.Cryptography.X509Certificates.X509Store启动角色,是否可以从代码中安装CER。 code>和 System.Security.Cryptography.X509Certificates.X509Certificates2 。您可以通过复制到输出目录=始终复制将CER包含到项目中。

I'm just thinking if you can install the CER from your code when your role was started by using System.Security.Cryptography.X509Certificates.X509Store and System.Security.Cryptography.X509Certificates.X509Certificates2. You can include your CER into your project with "Copy to Output Directory = Copy always".

这篇关于如何将证书部署到Azure中的“受信任的人”存储区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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