.NET Core Hosting Bundle

12,109

Solution 1

There is no official download of the ASP.NET Core Module for IIS ("ANCM"), though it can be installed by calling the hosting bundle installer with OPT_INSTALL_LTS_REDIST=0 OPT_INSTALL_FTS_REDIST=0 as arguments (at least for 1.0-2.0 installs).

What's the point of having a self contained application, if I still need to install the whole .net core sdk/runtime bundle on my IIS Server?

Apart from the installer being able to install only ANCM, do not forget that IIS is not the only hosting option for ASP.NET Core Applications. People may still opt to host it on linux or as a Windows Service. Either being exposed to the public Internet (which is supported from 2.0+) or behind NGINX/Apache/…

It is also very useful to deploy preview, daily or custom builds of any component inside .NET Core / ASP.NET Core if needed.

Solution 2

Check the docs on this topic.

The ASP.NET Core Module is a fork of HttpPlatformHandler which was modified to work with ASP.NET Core's new system and was previously used to host ASP.NET Applications. related GitHub issue

IIS needs it in order to start up your ASP.NET Core application when the first request arrives and to route requests to the ASP.NET Core application.

With .NET Core (and hence ASP.NET Core), ASP.NET Core comes with its own http server (previously this was only possible with Http.sys aka WebListener self-hosting, i.e. commonly used for WCF services). It also redirects a couple of headers to the application, since IIS with ASP.NET Core only acts as reverse proxy.

In other words, ASP.NET Core is hosted outside the IIS process, and ASP.NET Core Module is there to communicate with it and starts the outside process if not already. This also means, that ASP.NET Core applications hosted in IIS are subject to IIS lifetime cycle (i.e. IIS may and will stop your applications when idle - This doesn't happen when you self-host your application or use something like nginx as reverse proxy).

With ASP.NET Core 2.1 preview1 it will also be possible to host ASP.NET Core application in the IIS process (w3wp.exe) for a improve request throughput. For more information on this, read ASP.NET Core 2.1.0-preview1: Improvements to IIS hosting

Share:
12,109
gsharp
Author by

gsharp

If you like StackOverflow favorites and wish improvements read my meta post and vote up.

Updated on June 30, 2022

Comments

  • gsharp
    gsharp almost 2 years

    As far as I understood the Docs, the .NET Core Hosting Bundle installs the .NET Core Runtime, .NET Core Library and the ASP.NET Core Module.

    It seems that there's a Bundle for every version of the .NET Core Runtime (2.0.6, 2.0.7, ...).

    If I have a self contained deployment of my app, I still need the ASP.NET Core Module. However I don't see that the Module can be downloaded separately without the full bundle. Is there a place where I can download it ?

    If not:

    What's the point of having a self contained application, if I still need to install the whole .net core sdk/runtime bundle on my IIS Server?

  • gsharp
    gsharp about 6 years
    Hi Martin, thanks for your answer. Is there a documentation on the parameters that can be passed to the installer? Or a documentation on the compatibility of ANCN Version vs. .net core SDK version? (Does ANCN installed with Bundle 2.0.1 works with .net core SDK 2.0.7) See my comment that I gave to ChrisPratt, what that's relevant for me.
  • Martin Ullrich
    Martin Ullrich about 6 years
    It is at least mentioned on its github readme - github.com/aspnet/AspNetCoreModule
  • Martin Ullrich
    Martin Ullrich about 6 years
    If you think it should be documented better, do file an issue at github.com/aspnet/Docs
  • Mark G
    Mark G over 5 years