Self Hosting a secured ASP.Net Web API

Thursday, March 3, 2016

  Recently I had to build a self-hosted service that needs also to be contacted via SSL. I’ve found a few guides on the internet however they weren’t updated to the Owin.SelfHost so I’ve decided to write one of my own.   So, Here it is. 1, On your service you need to have a startup class, the same as you might have on your ASP.Net application.  There is nothing different between a regular and secured service. public class Startup { // This code configures Web API. The Startup class is specified as a type // parameter in the WebApp.Start method. public void Configuration(IAppBuilder appBuilder) { // Configure Web API for self-host. HttpConfiguration config =...
no comments