dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.44k stars 10.02k forks source link

Make AspNetCoreModuleV2 distributable locally with the application rather than installable globally #39099

Open wzychla opened 2 years ago

wzychla commented 2 years ago

Is your feature request related to a problem? Please describe.

On IIS farms, hosting bundle must be installed separately on multiple servers just to have the AspNetCoreModuleV2 available. The Core runtime doesn't have to be installed as it can be deployed together with the app. But the requirement to actually have the module installed makes the deployment more difficult that it could be.

Found only this thread on SO but the proposed solution still requires an extra package to be installed.

Describe the solution you'd like

An ideal solution would be to have the module packed together within the application. In this ideal solution, I could publish an app to get a DLL of the app, dozens of DLLs of the current runtime and one AspNetCoreModuleV2 DLL. The web.config would refer to this module rather than to a module that has to be installed globally.

If there's an official way to do this currently but I just miss it, I would be glad to get a reference to an existing solution. Regards.

ghost commented 2 years ago

Thanks for contacting us. We're moving this issue to the .NET 7 Planning milestone for future evaluation / consideration. Because it's not immediately obvious that this is a bug in our framework, we would like to keep this around to collect more feedback, which can later help us determine the impact of it. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

begemott commented 8 months ago

I thing that the suggestion makes sense. Currently there is no way to publish an ASP.NET Core application and then deploy it to IIS server without installing .NET Core Hosting Bundle.

martincostello commented 8 months ago

My understanding of how things are currently is a restriction of IIS itself, rather than ASP.NET Core

The bit installed into a IIS is a minimal shell that is essentially a stub, and it looks to what's deployed with the app for the actual implementation. That needs installed globally for IIS to be able to load it.

If that's the case, then it would need IIS/Windows to make changes to support this.

begemott commented 8 months ago

The requirement of installing AspNetCoreModuleV2 makes it difficult to deploy an ASP.NET Core application on a fresh computer automatically. For example it is quite easy to create an MSI package that installs a self-contained application on a computer, but it there is no simple way to install AspNetCoreModuleV2 module automatically.

wzychla commented 8 months ago

My understanding of how things are currently is a restriction of IIS itself, rather than ASP.NET Core

The bit installed into a IIS is a minimal shell that is essentially a stub, and it looks to what's deployed with the app for the actual implementation. That needs installed globally for IIS to be able to load it.

If that's the case, then it would need IIS/Windows to make changes to support this.

I haven't looked into technical details on how the AspNetCoreModuleV2 is implemented but I always thought that only native modules have to be installed globally. ASP.NET modules (from .NET Framework) don't have to, as the .NET Framework is always installed on modern Windows Servers.

Why the AspNetCoreModuleV2 can't be then implemented as a .NET.Framework module? Is there anything in there that can be implemented with native module but can't be provided by a .NET.Framework module?

Years pass and this is still an issue for organizations that still use IIS farms to host apps.