How to get info from client certificates issued by a CA (C#, VS 2010)
Hi all,
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:
Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1)
Or this depending on your OS version:
Microsoft Remote Server Administration Tools for Windows Vista
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
“
CERTADMINLib.CCertViewClass
“
to this:
“
CERTADMINLib.CCertView
“
4) Add Microsoft.CSharp reference.
I hope this helps.
Regards,
Alex (Alejandro Campos Magencio)