I developed this sample some time ago: How to get info from client certificates issued by a CA (C#). The other day I tried it on a new machine with Windows 7, Visual Studio 2010 and .NET Framework 4.0, and it didn’t even compile. I had to do the following to make it work:
1) Install this to be able to use certadmin.dll in a client machine:
Or this depending on your OS version:
And turn the feature on from “Control Panel” > “Programs and Features” > “Turn Windows features on or off”.
2) Generate certadminlib.dll with “tlbimp certadm.dll” and add it as a reference to the project.
3) Change this
4) Add Microsoft.CSharp reference.
I hope this helps.
Alex (Alejandro Campos Magencio)