你怎么能得到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?
感谢
答
试试这个博客文章:
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
}