Import-AzurePublishSettingsFile throws CryptographicException

感情迁移 提交于 2020-01-05 04:55:19

问题


Import-AzurePublishSettingsFile throws CryptographicException.

We uploaded a management certificate and all the Azure APIs are returning results but Import-AzurePublishSettingsFile throws following exception:

importSystem.Security.Cryptography.CryptographicException: An internal error occurred. at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)

at System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromBlob(Byte[] awData, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx)

at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromBlob(Byte[] rawData, Object password, X509KeyStorageFlags keyStorageFlags)

at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData, String password)

at Microsoft.WindowsAzure.Commands.Utilities.Common.PublishSettingsImporter.PublishSubscriptionToAzureSubscription(PublishDataPublishProfile profile, PublishDataPublishProfileSubscription s) in e:\projects\azure-sdk-tools\WindowsAzurePowershell\src\Commands.Utilities\Common\PublishSettingsImporter.cs:line 56

at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()

at System.Collections.Generic.List1..ctor(IEnumerable1 collection)

at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

at Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureProfile.ImportPublishSettings(String fileName) in e:\projects\azure-sdk-tools\WindowsAzurePowershell\src\Commands.Utilities\Common\WindowsAzureProfile.cs:line 293

来源:https://stackoverflow.com/questions/20040425/import-azurepublishsettingsfile-throws-cryptographicexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!