我明白了,而且很直接。
首先转到你的功能应用下的平台功能,你应该找到如下所示的SSL。
然后,您可以根据需要添加公共、私有或SSL证书。在我的例子中,我想添加一个已经导出的私有证书,它是私有密钥。
上载证书后,转到应用程序设置并添加此密钥/值:
网站加载证书:“您的证书指纹”
您应该能够使用如下的指纹加载证书:
using System;
using System.Security.Cryptography.X509Certificates;
...
X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
certStore.Open(OpenFlags.ReadOnly);
X509Certificate2Collection certCollection = certStore.Certificates.Find(
X509FindType.FindByThumbprint,
// Replace below with your certificate's thumbprint
"000000000000000000000000000000000000000",
false);
// Get the first cert with the thumbprint
if (certCollection.Count > 0)
{
X509Certificate2 cert = certCollection[0];
// Use certificate
Console.WriteLine(cert.FriendlyName);
}
certStore.Close();
...