title: How to get the X509Certificate from a client request
body: <p>I have a web-service which I secured using certificates.
  Now, I want to identify the client by looking at the certificate thumbprint. This means that I have a list of thumbprints on my service somewhere that are linked to some user.</p>
  
  <p>Actually, my first question (a little off-topic) is: is this a good approach or should I still introduce some username password construction?</p>
  
  <p>Second question is: how can I get the certificate that the client used to connect to the web-service so I can read the thumbprint at the service side.</p>
  
  <p>I did read a lot about it (like this post:<a href="https://stackoverflow.com/q/894121/508702">How do I get the X509Certificate sent from the client in web service?</a>) but could not find an answer.</p>
  
  <p>I have no HTTPContext, so that is not an option. In the post mentioned above is spoken about <code>Context.Request.ClientCertificate.Certificate</code> but I guess  they mean the <code>HTTPContext</code> there as well. Also adding <code>&lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;</code> to the web.config is also not an option.</p>