且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

asp.net Web API自托管/owin/武士刀

更新时间:2021-10-14 23:17:28

NuGet包

NuGet package here clearly states this.

Microsoft ASP.NET Web API 2.2自助主机5.2.2这是旧版软件包 用于在您自己的进程(IIS外部)中托管ASP.NET Web API. 请为新版本使用Microsoft.AspNet.WebApi.OwinSelfHost程序包 项目.

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.

无论如何,SelfHost很旧,并且基于WCF堆栈. OwinSelfHost是新的,基于Katana(名称为Katana,而不是Kitana,BTW).

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).

对于生产托管,控制台应用程序不实用.您将需要创建Windows服务.看看.

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