Bhavna Chaudhri

Bhavna Chaudhri

  • NA
  • 529
  • 20.6k

Why do we need WebHost or Host (generic host) in .Net Core?

Aug 6 2021 1:35 PM

In main(), there is a WebHost.CreateDefaultBuilder() that hosts our app in Kestral or IIS express, it also configures DI, logging, etc. My question is, why does it even need a host?

we never needed it in the .net framework, even if it has gone cross-platform, so what, why can't it be hosted on Linux (proxy) +Kestral without creating the Host?


Answers (1)