HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process) in Dot net core 3.1
ASP.NET Core 3.1 Runtime (v3.1.6) - Windows Hosting Bundle
You can download it from here.
The same thing happened to me in .net core 3.1. In my case some server roles and features were missing
Checking the Application Event Log I found the error '0x8007023e'
Checking the System Event Log I found a WAS (Windows Process Activation Service) communication error:
Then I installed the following roles and features:
Also I reinstalled ASP.NET Core Module (is a native IIS module that plugs into the IIS pipeline, allowing ASP.NET Core applications to work with IIS)
Finally I had to reassign the app pool to the site, and everything worked (I'm using InProcess model)