I'm writing the code to send email using the examples. I'm including DKIM so I have created a certificate and downloaded it and placed in my web root folder.
I'm attempting to get the public key with the code.
Certificate oCert = new Certificate();
oCert.Load("C:\\Users\\Nigel\\Documents\\Visual Studio 2015\\Projects\\TonerPeopleWebSite\\TP_Web\\tonerpeopleDKIM_Local.txt", "MyCertificatePassword", Certificate.CertificateKeyLocation.CRYPT_USER_KEYSET);
Console.WriteLine(oCert.PublicKey);
However, the oCert.Load raises and error "An error occured during an encode or decode operation".
I have tested the password when installing the certificate locally and all is fine with that.
Can anyone make any suggestions what is wrong?
Edited by user
5 years ago
|
Reason: Not specified