title: Using client certificates with HttpListener
body: <p>I'm using <code>HttpListener</code> to implement a simple web server. I'm binding to port 44430 -- I'm not port sharing with IIS. I've configured the server certificate by using <code>netsh</code>:</p>
  
  <pre><code>netsh http add sslcert ipport=0.0.0.0:44430 ^
      certhash=a614ebdfd07968dedd3afdb1cb8c696988dd7734 ^
      appid="{00112233-4455-6677-8899-AABBCCDDEEFF}"
  </code></pre>
  
  <p>Now, I'd like to require client certificates. I add <code>clientcertnegotiation=enable</code> to the above command, then it shows as enabled in <code>netsh http show sslcert</code>.</p>
  
  <p>I use the following code in my server:</p>
  
  <pre><code>var context = listener.GetContext();
  var clientCertificate = context.Request.GetClientCertificate();
  </code></pre>
  
  <p>...but when I browse to the site using Internet Explorer, then <code>clientCertificate</code> is <code>null</code>.</p>
  
  <p>What am I missing?</p>