How to set read permission on the private key file of X.509 certificate from .NET

前端 未结 6 1400
遥遥无期
遥遥无期 2020-11-28 07:12

Here is the code to add a pfx to the Cert store.

X509Store store = new X509Store( StoreName.My, StoreLocation.LocalMachine );
store.Open( OpenFlags.ReadWrite         


        
6条回答
  •  情书的邮戳
    2020-11-28 07:28

    This is the solution I found for windows server 2008 if anyone was interested: http://technet.microsoft.com/en-us/library/ee662329.aspx

    Basically, I had to grant permissions to the service that needs to access the certificate using the MMC tool. Works like a charm.

提交回复
热议问题