If you receive the following error in your ASP.NET Core application please see the fix below:
HTTP Error 500.21 - Internal Server Error Handler "aspNetCore" has a bad module "AspNetCoreModuleV2" in its module list
In your web.config find the following line:
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
Change it to:
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
Simply removing the V2 part of AspNetCoreModuleV2
Your issue should now be resolved.