Question when running the following code:
X509Certificate2 cert = new X509Certificate2(@"C:\file.p12", "password", X509KeyStorageFlags.Exportable);
RSACryptoServiceProvider crypt = (RSACryptoServiceProvider)cert.PrivateKey;
I get the following error: Keyset does not exist
.
I have not added the certificate to a store, is this required to be able to access the private key?