HTTP Error 500.21 - Internal Server Error Handler "aspNetCore" has a bad module "AspNetCoreModuleV2" in its module list

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.

  • 500.21, core, asp.net core, error, AspNetCoreModuleV2
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

Enabling the InProcess Hosting Model

As of ASP.NET Core version 2.2 + there is a new hosting model that adds support for direct In...

Enable .Net & .Net Core Debug Logging

By default error logging is turned off in .Net Core, .Net which is excellent for security....

HTTP Error 500.32 - Failed to load .NET Core host

If you receive the error "HTTP Error 500.32 - Failed to load .NET Core host" response from your...

How to enable ASP.NET, .Net Core & .Net on your website

.Net Core (All Versions) & .Net 6.0 & 7.0, ASP.NET 4.x and 2.x and Classic ASP are...