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

Freelance full-stack .NET and JS developer and architect. Located near Cologne, Germany.

1 thought on “netsh http add sslcert “the parameter is incorrect”

Leave a Reply

Your email address will not be published. Required fields are marked *