You need to sign in to do that
Don't have an account?
PureFacts
m_safeCertContext is an invalid handle
I am working through the example
https://developer.salesforce.com/page/Configuring-SAML-SSO-to-Custom-.Net-Application
and the sample code is getting the exception
status = signedXml.CheckSignature(cert, true);
Googling this it seems the it may be related to an uninitialized field
Anyone know how to address this.
Thanks in advance.
Whatty
https://developer.salesforce.com/page/Configuring-SAML-SSO-to-Custom-.Net-Application
and the sample code is getting the exception
m_SafeCertContext is an invalid handle
status = signedXml.CheckSignature(cert, true);
Googling this it seems the it may be related to an uninitialized field
Anyone know how to address this.
Thanks in advance.
Whatty
checking the signature failed!
System.Security.Cryptography.CryptographicException: m_safeCertContext is an invalid handle.
at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PublicKey()
at System.Security.Cryptography.Xml.SignedXml.CheckSignature(X509Certificate2 certificate, Boolean verifySignatureOnly)
First and foremost sincerely regret for the delayed reply.
The error is thrown because no valid certificate is found.
This can be caused by either:
- A problem with the cert. A common reason for this in a development environment is one of the cert properties differing from that of the environment eg cert common name does not match the site name. I guess this would also occur if the cert had expired.
- The cert did not get passed to the request.
For more details, please visit Error http://(m_safeCertContext is an invalid handle.) when accessing a client certificate using .NET 2.0/VS2005, also check out here for another discussion about this issue.For more information on similar issue please check here:
Mark this as solved if it's resolved.
Best Regards,
Nagendra.P