asp.net web api self hosting / owin / katana
Asked Answered
S

2

12

There are multiple question I have around self-hosting

Self Hosting Nuget

There are 2 nuget which provide self hosting : Microsoft.AspNet.WebApi.OwinSelfHost and Microsoft.AspNet.WebApi.SelfHost, so does microsoft have 2 implementation of self hosting?? or they are same??

Owin or Kitana

the name of nuget is Microsoft.AspNet.WebApi.OwinSelfHost has OWIN, but as far as I read Owin is an interface and Kitana an implementation, what is the name of the nuget for implementation??

Hosting in Production

I have managed to run the example by creating a console. But when deploying to prod, how to deploy?? Run the exe and keep running console, cant do that. what if somebody closes that console. So should be hosted as part of windows service?? or Is there any other way?

Splenectomy answered 12/11, 2014 at 8:54 Comment(0)
Z
18

NuGet package here clearly states this.

Microsoft ASP.NET Web API 2.2 Self Host 5.2.2 This is a legacy package for hosting ASP.NET Web API within your own process (outside of IIS). Please use the Microsoft.AspNet.WebApi.OwinSelfHost package for new projects.

Anyways, SelfHost is old and is based on WCF stack. OwinSelfHost is new and is based on Katana (name is Katana and not Kitana, BTW).

For production hosting, console app is not practical. You will need to create a Windows service. Take a look at this.

Zink answered 12/11, 2014 at 14:16 Comment(0)
S
2

after working on months with webapi/owin I got answers to above questions..

The package to use

Microsoft.AspNet.WebApi.OwinSelfHost

and for hosting better to use topshelf

Topshelf

please read this blog post

Splenectomy answered 10/3, 2016 at 13:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.