WindowsAzure.Management证书服务器端创建 [英] Creation of WindowsAzure.Management certificate on server side
问题描述
- 证书为Base64,通过命令获取获取-AzurePublishSettingsFile在Azure中的PowerShell(天青/设置没有自定义证书/管理证书不添加)
-
创建一个证书:
- Certificate in Base64, getting through the command Get-AzurePublishSettingsFile in Azure PowerShell (no custom certificates in Azure/Settings/Management Certificates do not add)
Create a certificate:
字节[] =证书Convert.FromBase64String(AzureData.Base64AzureManagementCertificate);
Byte[] certificate = Convert.FromBase64String(AzureData.Base64AzureManagementCertificate);
在这里AzureData.Base64AzureManagementCertificate - 资源文件
where AzureData.Base64AzureManagementCertificate - resource file
X509Cer = new X509Certificate2 (certificate, String.Empty, X509KeyStorageFlags.Exportable);
在本地运行项目,一切工作正常。
Locally run project, everything works fine.
出版后,X509Certificate2(...)的一个错误:
系统找不到指定的文件
After Publishing, X509Certificate2(...) in an error: "The system can not find the file specified"
我该如何解决这个问题?
How do I solve this problem?
推荐答案
根据文章尽一切:
<一href=\"https://azure.microsoft.com/blog/2014/10/27/using-certificates-in-azure-websites-applications/\" rel=\"nofollow\">https://azure.microsoft.com/blog/2014/10/27/using-certificates-in-azure-websites-applications/
但(3从应用接入)
我们还必须将证书.CER添加到Azure的/设置/管理证书
然后初始化证书:
We must also add the certificate .cer to Azure/Settings/Management Certificates Then initialize the certificate:
new X509Certificate2(certificate, "password", X509KeyStorageFlags.MachineKeySet);
在哪里证书.pfx文件,密码 - 以PFX
where certificate .pfx file, password - to PFX
这篇关于WindowsAzure.Management证书服务器端创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!