无法读取X509Certificate2私钥

编程入门 行业动态 更新时间:2024-10-22 17:33:18
本文介绍了无法读取X509Certificate2私钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用X509Certificate2 [PFX],我从Microsoft Azure AppService [非Web角色]中的My / CurrentUser存储中读取此证书。如果应用程序在空闲超时后尝试重新启动,似乎证书丢失了其私钥,我无法解密消息。

I am using an X509Certificate2 [PFX] and I am getting this certificate read from the My / CurrentUser Store in Microsoft Azure AppService [Not Web Role]. In case of the application trying to restart after a idle timeout, it seems that the certificate looses its private key and I am not able to decrypt the messages.

有没有除了上传证书之外,还要在Azure AppService中进行特定更改,以确保证书的私钥在内部可读。

Is there any specific change to be done in the Azure AppService other than uploading the certificate to make sure that the certificate's Private key is readable internally.

甚至尝试使用私有blob进行此操作并获得" ;未找到密钥集"证书商店和证书商店中的例外情况BLOB存储。

Even tried to use a private blob for this and got the "Key Set Not Found" exception in both the Certificate Store & the BLOB Storage.

我不确定为什么私钥会突然丢失,为什么会抛出异常。请建议一种自动防故障方法。我假设即使在这种情况下,选择使用Azure Key Vault也不会阻止错误出现。

I am not sure why the private key is lost all of a sudden and why would the exception be thrown. Kindly suggest a fail-safe method. I assume that even with this case, opting for use of a Azure Key Vault would not stop the errors from coming up.

推荐答案

您好d.saravanan,

Hi d.saravanan,

感谢您在此发帖。

根据您的问题与Azure网络应用程序更相关,您可以发布新帖子in Azure 和ASP.NET 论坛以获得合适的支持。

According to your question is more related to Azure web app, you could post a new thread inAzure and ASP.NETforum for suitable support.

Visual C#讨论并询问C#编程语言,IDE,图书馆,样本和工具。

The Visual C# discuss and ask the C# programming language, IDE, libraries, samples and tools.

如果您有一些语法或代码错误,请随时与我们联系。我们将尽力为您提供解决方案。

If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

感谢您的理解与合作。

最诚挚的问候,

Wendy

更多推荐

无法读取X509Certificate2私钥

本文发布于:2023-11-05 08:22:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1560349.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:私钥

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!