HTTPS support

Topics: blog, faq
Jan 27, 2013 at 1:55 AM
Edited Jan 27, 2013 at 3:29 AM

hi, the only piece of information I found relavant to HTTPS support is this:

http://webserver.codeplex.com/wikipage?title=HTTPS

This thread however only discussed how to generate the certificates - but how to point our codeplex webserver to the certificate for it to actually use it?

I dig around a little - I suspect the final step is you'd need to register (bind to port# desired) the generated/bought SSL certificate with "Windows" using HttpCfg.exe downloaded from http://msdn.microsoft.com/en-us/library/ms733791.aspx

Then any incoming request to the configured port# will be protected by SSL? Is this how it will work?

Thanks

 

REF

Self hosted WCF service with SSL: http://www.codeproject.com/Articles/24027/SSL-with-Self-hosted-WCF-Service

HttpCfg.exe from MSDN: http://msdn.microsoft.com/en-us/library/ms733791.aspx

Developer
Jan 27, 2013 at 5:28 PM

You need to use a SecureHttpListener with the server:

var cert = new X509Certificate(@"path\to\certificate.cer");
var listener = HttpListener.Create(IPAddress.Loopback, 443, cert);
server.Add(listener);

Also have a look at TekCERT. Will help you setup and manage your certificates.

Jan 28, 2013 at 2:43 AM

Great thanks I will give it a try tomorrow!

Aug 12, 2013 at 9:33 AM
wo80, it works. Sorry I didn't reply sooner. Thanks anyway.