title: Programmatically using smartcard to login onto Active Directory (C#)
body: <p>Here is my scenario:</p>
  
  <p>I have a client application running outside the domain, on a computer outside the domain. </p>
  
  <p>My application needs to prompt the user to login with smart-card, and use the x.509 certificate on the card to authenticate against active directory. </p>
  
  <p>While I did find some libraries that give access to the smartcard, I can't seem to find the right API to extract the certificate from the smart card (or from the store), and validate it against the AD. </p>
  
  <p>Also, I am kind of lost on the many differnet libraries and framework: WCF, WSE (kerberos, x.509?), cryptoAPI etc. </p>
  
  <p>To make my question focuesd: what would be the best direction in order to allow a user to login to a domain from my client application? </p>
  
  <p>Thanks!</p>