Reputation: 1106
I'm having trouble in understanding the way to implement both https and http
in a single service
.
I have a OWIN hosted Web API
. Currently it serves http only. I like to implement ssl for it. Creating two http server instances
does the job but this StackOverflow question says that Katana or Microsoft.Owin.HttpListener can be used to accomplish this purpose.
How is that possible using Microsoft.Owin.HttpListener
?
Upvotes: 1
Views: 2117
Reputation: 6094
Start by getting https set up: https://github.com/aspnet/AspNetKatana/wiki/Selfhosting
Then you just need to add both the http and the https url when you start the service: https://github.com/aspnet/AspNetKatana/blob/f3a8d848b7548e62d52737efa0a4fc9cf6c6cedf/src/Microsoft.Owin.Hosting/StartOptions.cs#L39 https://github.com/aspnet/AspNetKatana/blob/f3a8d848b7548e62d52737efa0a4fc9cf6c6cedf/src/Microsoft.Owin.Hosting/WebApp.cs#L34
What do you call today to set the url?
Upvotes: 3