Reputation: 1237
I hava a self-hosted wcf service which is configured for ssl. The certifiacate is bound to the port of the service by commandline, using the 'netsh' command, e.g.:
netsh http add sslcert ipport=0.0.0.0:8000 certhash=XYZ appid={"ABC"}
This is described here: http://msdn.microsoft.com/de-de/library/ms733791(v=vs.110).aspx. It works as expeced.
Now I just discovered that there is a SetCertificate-Method: http://msdn.microsoft.com/de-de/library/system.servicemodel.description.servicecredentials.servicecertificate(v=vs.110).aspx
So, I thought I can make use of this method, and do not need the netsh comamnd for binding the certifiacte anymore. But it does not work? SetCertificate seems to have no effect? So what else is it used for? Am I missing something?
Upvotes: 1
Views: 977
Reputation: 1237
I think I can answer my own question. Found the answer here:
http://msdn.microsoft.com/de-de/library/ms789011(v=vs.110).aspx
So the SetCertificate method is only used when Transport is TCP. In my case it is Http, so I have to bind the Certificate to the port manually as I did.
Upvotes: 1