<bdo id='sGinu'></bdo><ul id='sGinu'></ul>

<i id='sGinu'><tr id='sGinu'><dt id='sGinu'><q id='sGinu'><span id='sGinu'><b id='sGinu'><form id='sGinu'><ins id='sGinu'></ins><ul id='sGinu'></ul><sub id='sGinu'></sub></form><legend id='sGinu'></legend><bdo id='sGinu'><pre id='sGinu'><center id='sGinu'></center></pre></bdo></b><th id='sGinu'></th></span></q></dt></tr></i><div id='sGinu'><tfoot id='sGinu'></tfoot><dl id='sGinu'><fieldset id='sGinu'></fieldset></dl></div>
<tfoot id='sGinu'></tfoot>

    <small id='sGinu'></small><noframes id='sGinu'>

    1. <legend id='sGinu'><style id='sGinu'><dir id='sGinu'><q id='sGinu'></q></dir></style></legend>

        从 C# Azure 函数中访问证书

        Accessing Certificate from within a C# Azure function(从 C# Azure 函数中访问证书)
      1. <small id='AvUK1'></small><noframes id='AvUK1'>

          <bdo id='AvUK1'></bdo><ul id='AvUK1'></ul>
            <tbody id='AvUK1'></tbody>
              1. <legend id='AvUK1'><style id='AvUK1'><dir id='AvUK1'><q id='AvUK1'></q></dir></style></legend>

              2. <tfoot id='AvUK1'></tfoot>

                  <i id='AvUK1'><tr id='AvUK1'><dt id='AvUK1'><q id='AvUK1'><span id='AvUK1'><b id='AvUK1'><form id='AvUK1'><ins id='AvUK1'></ins><ul id='AvUK1'></ul><sub id='AvUK1'></sub></form><legend id='AvUK1'></legend><bdo id='AvUK1'><pre id='AvUK1'><center id='AvUK1'></center></pre></bdo></b><th id='AvUK1'></th></span></q></dt></tr></i><div id='AvUK1'><tfoot id='AvUK1'></tfoot><dl id='AvUK1'><fieldset id='AvUK1'></fieldset></dl></div>

                1. 本文介绍了从 C# Azure 函数中访问证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要从我的 Azure Function 访问证书.

                  I need to access a certificate from my Azure Function.

                  我按照 运行时错误加载证书Azure Functions 但没有成功.

                  I followed the steps outlined in Runtime error loading certificate in Azure Functions but it didn't work out.

                  private static X509Certificate2 GetCertificate(string thumbprint, TraceWriter log)
                  {
                      X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
                      try
                      {
                          store.Open(OpenFlags.ReadOnly);
                          log.Info("Enumerating certificates");
                          foreach (var cert in store.Certificates) {
                              log.Info(cert.Subject);
                          }
                          var col = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false);
                          if (col == null || col.Count == 0)
                          {
                              return null;
                          }
                          return col[0];
                      }
                      finally
                      {
                          store.Close();
                      }
                  

                  }

                  上传到 Azure 函数的两个证书和设置 WEBSITE_LOAD_CERTIFICATES 也被添加并设置为 * 或所需证书的 thumpbrint,但无济于事.

                  Two certificates where uploaded to the Azure Function and the setting WEBSITE_LOAD_CERTIFICATES was added as well and set to either * or to the thumpbrint of the required certificate, but to no avail.

                  GetCertificate 方法应该打印存储区中所有证书的列表,但存储区是空的.

                  The GetCertificate method should print a list of all certificates in the store, but the store is empty.

                  关于如何解决这个问题的任何线索?

                  Any clues on how to solve this?

                  推荐答案

                  更新:消费计划现在支持客户端证书.

                  UPDATE: Client certificates are now supported in the Consumption plan.

                  我们的消费计划尚不支持客户端证书,仅在应用服务计划中支持.我们的 repo here 中的一个问题对此进行了跟踪.我们正在努力解决这个问题 - 请关注该问题的状态.谢谢.

                  Client certificates are not yet supported in our Consumption plan, only in App Service plan. This is tracked by an issue in our repo here. We're working on it - please follow that issue for status. Thanks.

                  这篇关于从 C# Azure 函数中访问证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding and removing users from Active Directory groups in .NET(在 .NET 中的 Active Directory 组中添加和删除用户)
                  set equality in linq(在 linq 中设置相等)
                  HashSet conversion to List(HashSet 转换为 List)
                  How to set timeout for webBrowser navigate event(如何为 webBrowser 导航事件设置超时)
                  Test whether two IEnumerablelt;Tgt; have the same values with the same frequencies(测试两个IEnumerablelt;Tgt;具有相同频率的相同值)
                  How do you determine if two HashSets are equal (by value, not by reference)?(您如何确定两个 HashSet 是否相等(按值,而不是按引用)?)
                    <bdo id='MGx7M'></bdo><ul id='MGx7M'></ul>

                        <small id='MGx7M'></small><noframes id='MGx7M'>

                      1. <legend id='MGx7M'><style id='MGx7M'><dir id='MGx7M'><q id='MGx7M'></q></dir></style></legend>
                        <tfoot id='MGx7M'></tfoot>

                              <tbody id='MGx7M'></tbody>
                          • <i id='MGx7M'><tr id='MGx7M'><dt id='MGx7M'><q id='MGx7M'><span id='MGx7M'><b id='MGx7M'><form id='MGx7M'><ins id='MGx7M'></ins><ul id='MGx7M'></ul><sub id='MGx7M'></sub></form><legend id='MGx7M'></legend><bdo id='MGx7M'><pre id='MGx7M'><center id='MGx7M'></center></pre></bdo></b><th id='MGx7M'></th></span></q></dt></tr></i><div id='MGx7M'><tfoot id='MGx7M'></tfoot><dl id='MGx7M'><fieldset id='MGx7M'></fieldset></dl></div>