ASP.NET CORE托管-错误内部服务器错误处理程序"aspNetCore";具有错误的模块"AspNetCoreModule";在其模块列表中 [英] ASP.NET CORE Hosting - Error Internal Server Error Handler "aspNetCore" has a bad module "AspNetCoreModule" in its module list

查看:681
本文介绍了ASP.NET CORE托管-错误内部服务器错误处理程序"aspNetCore";具有错误的模块"AspNetCoreModule";在其模块列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在托管ASP.NET Core 2网站,并出现以下错误消息.

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

我的应用程序正在使用nopCommerce 4.00,并且服务器端已经安装了ASP.NET Core组件.

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

推荐答案

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.

然后我查看了IIS模块,以检查.NET核心托管捆绑包是否正确安装,并且看到了,

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

所以我更改了web.config中的模块,

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.

这篇关于ASP.NET CORE托管-错误内部服务器错误处理程序"aspNetCore";具有错误的模块"AspNetCoreModule";在其模块列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆