Windows Azure Management Libraries Certification Error on Web Jobs

前端 未结 1 1403
别跟我提以往
别跟我提以往 2021-01-03 12:43

I built a Azure web job console which is referring Windows Azure Management Libraries. I tried to authenticate my app by using public setting approach.

The program i

相关标签:
1条回答
  • 2021-01-03 13:18

    I would suggest starting with this blog post: http://blog.tylerdoerksen.ca/2015/11/29/pfx-certificate-files-and-azure-web-apps/. Though this blog post is about Azure Websites and not Azure Webjobs per se however I'm inclined to believe that your problem is because of this. In fact, I ran into exact same problem with Azure Websites.

    However in order to use the solution outlined in the blog post, you can't use the certstring from the publish setting file as is. Here's what you would need to do:

    1. Through another console application, first create an X509 certificate and install it in the certificate store of your local computer.
    2. Export the certificate in PFX format and provide a password.
    3. Include this PFX certificate as a part of your solution. In case of Azure Websites, we had to include this file in App_Data folder, not sure where you will include it in case of Webjob. You can try so that it is present in the bin folder.
    4. Read this file and try to create an instance of X509 Certificate using the syntax specified in the blog post (and copied here):

      var cert = new X509Certificate2(pfxFile, "myPassword", X509KeyStorageFlags.MachineKeySet);
      
    0 讨论(0)
提交回复
热议问题