Retired Microsoft Blog disclaimer

This directory is a mirror of retired "Decrypt My World" MSDN blog and is provided as is. All posting authorship and copyrights belong to respective authors.
Original URL: https://blogs.msdn.microsoft.com/alejacma/2009/11/12/access-violation-exception-when-loading-a-certificate-in-net-windows-server-2003/
Post name: Access Violation exception when loading a certificate in .NET (Windows Server 2003)
Original author: Alejandro Campos Magencio
Posting date: 2009-11-12T07:32:00+00:00


Hi all

You may get an Access Violation exception when loading a certificate into a X509Certificate2 object, only after installing KB 938397 hotfix (crypt32.dll v5.131.3790.4095) at Applications that use the Cryptography API cannot validate an X.509 certificate in Windows Server 2003.

Note that the issue won't happen with Windows Server 2003 SP2 version of crypt32.dll (v5.131.3790.3959).

Note that the issue only happens with Base64 encoded certificate files. DER encoded certificate fileswork just fine.

The good news is that a newer hotfix, KB 950474, installs a newer version of crypt32.dll that fixes the issue:v5.131.3790.4271. You can get it here: Error message when you run the SharePoint Products and Technologies Configuration Wizard on a Windows Server 2003-based computer: "Application has generated an exception that could not be handled".

I hope this helps.

Regards,

Alex (Alejandro Campos Magencio)

PS: What are you still doing with Windows Server 2003? Have you tried the new Windows Server 2008 R2? IT JUST ROCKS!!!!


Share this article:

Comments:

Comments are closed.