I have a win 2008 server IIS7 and users who login with a CAC card. I want to add the user's CAC card user name to the web page when they login. And I'd also like to log user info from CAC card to my web server so I can see who's visiting my web site.
migrated from stackoverflow.com May 6 '12 at 20:31
This question came from our site for professional and enthusiast programmers.
If client certificates are enabled (Web Site > SSL Settings > Client Certificates > Accept), when the user authenticates with their smart card, the certificate is present as part of the Request object. You can retrieve it using Subject property the ClientCertificate.
You want IIS7 to require SSL Client Certificates, this is why users need to make certificates available to windows through their card reading software, the browser passes the certificates from the card to IIS7.
These are abbreviated instructions from technet.
This in combination with Gregs answer should be enough to get you started.
I would also run this by your legal team to see if you can log the connections, you may need to put a consent to monitoring preamble on the page.