-1

I am studying Asp.Net Core. and honestly I am little confused.

On official website it says:

ASP.NET Core is completely decoupled from the web server environment that hosts the application

What does it mean? does it mean asp.net Core apps can be hosted on any server that accepts http traffic and respond to it, I get this notion from following line

ASP.NET Core supports hosting in IIS and IIS Express, and self-hosting scenarios using the Kestrel and WebListener HTTP servers

from the above quote: what is Kestrel and WebListener HTTP servers? Does that mean apache tomcat can also host asp.net core apps and if it can then what I will need after installing apache?

and the last thing I am wondering is this

Additionally, developers and third party software vendors can create custom servers to host their ASP.NET Core apps.

how can one create custom servers to host asp.net core apps. does this referring to self hosted apps using OWIN?

Tseng
  • 61,549
  • 15
  • 193
  • 205
user786
  • 3,902
  • 4
  • 40
  • 72

1 Answers1

3

apps are basically self hosted by default, basically a console app that internally runs kestrel web server. When they say it is decoupled from a web server what they mean is older ASP.NET apps were tightly coupled to IIS, and the new ASP.NET Core is decoupled from that. To see the bare bones of it look at this sample and see how Program.cs is like a console app that would be called by dotnet command, ie dotnet run and it configures how things are hosted and what the startup class is.

currently, kestrel is not meant to be an internet facing web server, there is a module to run it behind IIS and there are tutorials out there about running it proxied behind nginx. Should also be possible to do this with apache but not sure if there is a module existing for it yet or if one is needed

kestrel is cross platform and used by default, weblistener can be used instead of kestrel but I "think" that is windows only

I'm not sure if we still call it OWIN anymore but something very the same as OWIN is how we configure the middleware pipeline from the startup class

Joe Audette
  • 35,330
  • 11
  • 106
  • 99
  • so it seems we have 2 middleware pipelines [ASP.NET pipeline](https://docs.asp.net/en/latest/fundamentals/middleware.html) and OWIN pipeline which can hook into the ASP.NET pipeline. but the VS project templates for aspnet core don't seem to use OWIN like they did in MVC 5 templates, I guess you only need that if you have existing OWIN components that you want to plugin, but still the ASP.NET middleware pipeline is very much like OWIN so I'm a little confused, I thought the asp.net pipeline was the evolution of OWIN – Joe Audette Jun 26 '16 at 20:38
  • The ASP.NET Core pipeline is built on top of OWIN. It's basically a set of helpers and types on top of the low-level OWIN stuff. – Nate Barbettini Jun 27 '16 at 00:19