ASP.NET Core project targeting .net framework doesn't start when hosted by IIS with InProcess hosting model.
Steps to reproduce the behavior:
Either application displays, or a clear error indicating the issue.
error on browsing

ancm debug log

web.config

IIS version

I have only run into this issue with projects with TargetFramework of net461.
Other projects targeting netcoreapp2.2 work fine.
https://docs.microsoft.com/en-us/aspnet/core/migration/21-to-22?view=aspnetcore-2.2&tabs=visual-studio#adopt-the-iis-in-process-hosting-model
This is by design. (Also, dup of: https://github.com/aspnet/AspNetCore/issues/6482)
I would expect an error when publishing then, as it should be obvious that it wouldn't work at that point.
Most helpful comment
I would expect an error when publishing then, as it should be obvious that it wouldn't work at that point.