I am getting a System.Security.Cryptography.CryptographicException when I try to load a certificate on the IIS to insert a signature in my PDF.
After searching the web I came to the result that it is possible to set the "Load user profile" option of the AppPool to "true". That would work but it gives the IIS the full user rights.
Is there another way to load the certificate?
Here is the full exception:
System.Security.Cryptography.CryptographicException: An internal error occurred.
at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
at System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx)
at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
at Spire.Pdf.Security.PdfCertificate..ctor(String pfxPath, String password)
Best regards