I am getting this error when trying to run my code locally which is setup in IIS
I am not sure why this error happens or why it is looking for and aspnetcore dll when this is an old website that is running under .NET 4.7
I've installed the core runtime and restarted IIS and rebooted but still get the same error. Also, I noticed that after the error happens, it shuts down the app pool associated with the website.
Any ideas welcome. Thanks
Based on some comments, I am adding a screenshot of the event viewer details tab of the error highlighted in the first image
I suggest you open VS to check whether ASP.NET Core is referenced in the Applicationhost.config
file (.vs\config\applicationhost.config
), and try to load non-existent modules.
If so, you need to comment out all references to aspnetcore.dll. Additionally, you need to do the same for the Applicationhost.config
file in the folder C:\Windows\System32\inetsrv\Config
. Then restart iis and try again.