Inserting Certificate (with privatekey) in Root, LocalMachine certificate store fails in .NET 4

后端 未结 6 515
清酒与你
清酒与你 2020-11-30 08:12

I\'m having problems inserting a new CA certificate with privatekey in the Root certificate store of the localmachine.

This is what happens:

//This          


        
6条回答
  •  醉梦人生
    2020-11-30 08:21

    new X509Certificate2(localPFXPath, inputPass, X509KeyStorageFlags.MachineKeySet & X509KeyStorageFlags.PersistKeySet); with the & instead of the | worked for me.

提交回复
热议问题