All notes
Owi

Specification

owin.org: 1.0.

OWIN: Open Web Server Interface for .NET.

Self hosting

asp.net: hosting aspnet web api.

wcfNote: I am now running a console app with OwinHost support. Before that, I was trying Library Project type (DLL) and using owinhost.exe to load it, but failed. Thanks to [email protected]: "gotta be a console app".


using Microsoft.Owin.Hosting; // For WebApp.
using System;
using System.Net.Http;

[assembly: OwinStartup(typeof(testHost.Startup))]

namespace testHost
{
    class Program
    {
        static void Main(string[] args)
        {
            int port = 1234;
            string uri = string.Format("http://localhost:{0}/", port);

            using (WebApp.Start<Startup>(uri))
            {
                Console.WriteLine("Started on "+uri);
                Console.ReadKey();
                Console.WriteLine("Stopping");
            }
        }
    }

    public class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
            setupHangfire(app);
        }
    }
}