你怎么能得到code在Windows Azure上的证书 [英] How can you get a certificate in code on Windows Azure
本文介绍了你怎么能得到code在Windows Azure上的证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图创造我们自己的WIF身份提供者,并在Azure上运行,但试图自动生成联合会元数据时,我挣扎。
I'm trying to create our own WIF Identity Provider and run it on Azure but I'm struggling when trying to automatically generate the Federation Metadata.
这行不会出现在Azure上运行:
This line does not appear to work on Azure:
CertificateUtil.GetCertificate(StoreName.My, StoreLocation.LocalMachine, signingCertificateName);
证书上传到Azure的,我怎么能弄个?
The certificate is uploaded to Azure, how can I get hold of it?
感谢
推荐答案
试试这个博客文章:
<一href=\"http://blogs.msdn.com/b/jnak/archive/2010/01/29/installing-certificates-in-windows-azure-vms.aspx\">http://blogs.msdn.com/b/jnak/archive/2010/01/29/installing-certificates-in-windows-azure-vms.aspx
这表明code,如:
X509Certificate2Collection selectedCerts = new X509Certificate2Collection();
X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.OpenExistingOnly | OpenFlags.ReadOnly);
foreach (X509Certificate2 cert in store.Certificates)
{
// do stuff with cert
}
这篇关于你怎么能得到code在Windows Azure上的证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文