簡體   English   中英

在服務器端創建WindowsAzure.Management證書

[英]Creation of WindowsAzure.Management certificate on server side

  1. Base64中的證書,通過Azure PowerShell中的命令Get-AzurePublishSettingsFile獲取(Azure / Settings / Management證書中不添加自定義證書)
  2. 創建證書:

    Byte []證書= Convert.FromBase64String(AzureData.Base64AzureManagementCertificate);

其中AzureData.Base64AzureManagementCertificate-資源文件

X509Cer = new X509Certificate2 (certificate, String.Empty, X509KeyStorageFlags.Exportable);

本地運行的項目,一切正常。

發布后,X509Certificate2(...)出現錯誤:“系統找不到指定的文件”

我該如何解決這個問題?

根據文章執行所有操作: https : //azure.microsoft.com/blog/2014/10/27/using-certificates-in-azure-websites-applications/

但是(3.從應用程序訪問)

我們還必須將證書.cer添加到Azure / Settings / Management證書,然后初始化證書:

new X509Certificate2(certificate, "password", X509KeyStorageFlags.MachineKeySet);

證書.pfx文件,密碼-PFX

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM