title: WCF Service that identifies client by certificate
body: <p>we've got a WCF Service using BasicHttpBinding with server- and client-certificates. We are using Transport security:</p>
  
  <pre><code>&lt;security mode="Transport"&gt;
    &lt;transport clientCredentialType="Certificate" /&gt;
  &lt;/security&gt;
  </code></pre>
  
  <p>So far everything works (client calls a webmethod and is only allowed to, if the client certificate is issued by the trusted CA).</p>
  
  <p>Now we want to check in the WCF service, if the client certificate is a specific certificate. The certificate we are looking for is known (installed on) the server, too.</p>
  
  <p>How do we get the used client certificate in the service code? How do we load the certificate we want to compare to? How do we compare?</p>