Site in Azure Websites fails processing of X509Certificate2

前端 未结 6 1157
傲寒
傲寒 2020-12-13 18:09

I have site in Azure Websites (not Hosted Service) and I need processing .pfx certificates with private key there.

var x509Certificate2 = new X509Certificat         


        
6条回答
  •  我在风中等你
    2020-12-13 18:53

    Azure Websites run in a shared environment. I am assuming that the constructor for the certificate is attempting to create some temporary information on the instance and it does not have permission to.

    You may have to upgrade to a hosted service in order to run in an elevated context and perform this work.

    Also, have you validated that the password is correct? If it doesn't require a password, you at least have to pass string.Empty to the constructor. Passing in a NULL value would also cause this exception.

提交回复
热议问题