Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET CORE Hosting - Error Internal Server Error Handler "aspNetCore" has a bad module "AspNetCoreModule" in its module list

Tags:

I'm hosting ASP.NET Core 2 site and getting below error message.

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

My application is using nopCommerce 4.00 and server side already ASP.NET Core component is installed.

like image 546
Raju Paladiya Avatar asked Jul 14 '18 08:07

Raju Paladiya


1 Answers

I was facing the same issue after following this blog on how to host an asp.net core app into IIS. Visual studio had added the following web.config in the published output folder.

enter image description here

Then I looked into my IIS module to check if the .NET core hosting bundle was installed properly and I saw this,

enter image description here

So I changed the module in web.config,

<handlers>
  <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>

and it worked without any issues after that.

like image 124
Zaki Choudhury Avatar answered Sep 21 '22 15:09

Zaki Choudhury