Original URL: | https://blogs.msdn.microsoft.com/alejacma/2012/04/04/how-to-get-info-from-client-certificates-issued-by-a-ca-c-vs-2010/ |
Post name: | How to get info from client certificates issued by a CA (C#, VS 2010) |
Original author: | Alejandro Campos Magencio |
Posting date: | 2012-04-04T07:24:26+00:00 |
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 thisto be able to usecertadmin.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)
Comments: