nigelstephens
5 years ago
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?
ivan
  • ivan
  • 100% (Exalted)
  • Administration
5 years ago
could you send your certificate and password to support@emailarchitect for assistance? It seems that your file is not in p12 format.

Finally problem is solved (invalid file path)

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.