.NET Client With HTTPS Certificate Authetication Fails With Timeout

In this article, I want to show a problem I faced trying to connect a .NET client to a server using SSL/TLS and certificate authentication for both client and server. To forestall my problem, I got a timeout. But let’s look at the some details first. Here is the wire capture of a successful connection:
Continue reading

netsh http add sslcert "the parameter is incorrect"

In the last post, I referenced a blog post by Dominick Baier about how to set up WCF over SSL. Following his instructions and copying his samples, I got an error when I tried to map the SSL certificate to the WCF service port using netsh http add sslcert. The error stated that “the parameter is incorrect”. I searched for that error on the internet and found lots of people having the same issue. I searched hours and hours and hours… until Thomas Stensitzki came along and noticed that I had one parameter followed by a colon instead of an equality sign!

This is what I originally used:

 netsh http add sslcert ipport: certhash=a1540c1ddecc36f9c30e9eb1bad655b63b5cbc03 appid={74B2A5EB-5FD8-4B89-A69F-E5D038D5E287} 

Notice the colon behind ipport. THAT was my error. Of course, the above line has to look like this:

 netsh http add sslcert ipport= certhash=a1540c1ddecc36f9c30e9eb1bad655b63b5cbc03 appid={74B2A5EB-5FD8-4B89-A69F-E5D038D5E287} 

By the way: I used Windows Sever 2008 R2

SSL Needs Certificates

There are many blogs out there describing how to configure a WCF service to use SSL (for example this one by Dominick Baier or this one at Microsoft’s that also shows how to do it in code). In short, here’s an example for such a configuration: Continue reading