Error – Handler “aspNetCore” has a bad module “AspNetCoreModuleV2” in its module list

This post will explain how to resolve the error “Handler “aspNetCore” has a bad module “AspNetCoreModuleV2” in its module list” when you deploy your ASP.NET application.

There are times when you might face the below error immediately after you deployed your ASP.NET Core application.

HTTP Error 500.21 – Internal Server Error Handler “aspNetCore” has a bad module “AspNetCoreModuleV2” in its module list

You might notice that the application might be working fine on the localhost or Development machine and the error would be seen only when hosting the application.

The reason for the error is that you are using a different .NET Core version than the one installed in the hosting machine.

For example , I started facing the error because the application that i was deploying was targetting .NET Core 3.1 and few modules was using .NET Core 2.2. The hosting machine has only .NET Core 2.1 installed. so, changing the target version and building them ob .NET Core 2.1 for all the modules sorted out this issue for me.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

You can read connection string from web.config file in ASP.NET by using the ConfigurationManager class in case you want to...
When you deploy your ASP.NET Web Application on Windows Server running IIS , there are times that you might receive...
This post will provide the list of some of the top ASP.NET based Content Management Systems (CMS) that you may...