Search code examples
c#asp.net-coreiis

Hosting multiple ASP.NET apps using the same application pool with AspNetCoreModuleV2 - avoiding 500 error


I am trying to host a multiple ASP.NET Core applications using the same application pool in IIS. But were receiving a 500 error on the other application and only first one hosted is working.

Does anyone know whats the reason behind this?

Note: We tried reducing the module version in web.config "AspNetCoreModuleV2" to "AspNetCoreModule" and the other application worked, but I don't want to use this solution.


Solution

  • One app per pool is the design limitation of ASP.NET Core module in-process hosting mode.

    Sharing an app pool among apps isn't supported. Use one app pool per app.

    You either accept that and use one app per app pool, or switch to out-of-process mode (actually you did that by using the version 1 of ASP.NET Core module).