开发者

X509Certificate2: Internal error

开发者 https://www.devze.com 2023-03-14 14:43 出处:网络
When I try to execute code below I got an error: Internal error occurred. var certificate = new X509Certificate2( p12FileBytes, p12FilePassword );

When I try to execute code below I got an error:

Internal error occurred.

var certificate = new X509Certificate2( p12FileBytes, p12FilePassword );

when I added

X509KeyStorageFlags.MachineKeySet(
   new X509Certificate2(
      p12FileBytes, p12FilePassword,  X509KeyStorageFlags.MachineKeyS开发者_如何学运维et)).

I got another error:

Access Denied.

How can I fix it?

Thanks in advance.

Regards,

Stepan.


Run the second code with elevated privileges.

0

精彩评论

暂无评论...
验证码 换一张
取 消