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

Readme file error on SignalR SelfHost package

Thursday, July 25, 2013

When installing Microsoft.SignalR.SelfHost package, there was, as in any SignalR nuget package a readme file opened. However, this time there’s an error in the file that caused me an hour of head-scratching.   The readme suggested you call the self-hosted web application as the following: (Copied from the readme file)   using System; using Microsoft.Owin.Hosting; namespace MyWebApplication { ...
no comments

Self Hosting SignalR

Sunday, January 20, 2013

Self Hosting SignalR SignalR, as shown in the earlier posts, can be hosted within a regular ASP.NET application (in other words, on IIS), but can also be self-hosted. You may want to do so if you don’t want the SignalR hosting machine to have IIS installed. In this post I’ll show a simple way of doing so with a console application. It won’t be much different with windows service and I’ll explain how to do it there as well.   ...
2 comments