IIS报错:HTTP 错误 500.21 – Internal Server Error,如何解决

这一段时候,换了个新电脑,重新配置好IIS后,发现部署IIS上面的网站运行不了

问题描述:HTTP 错误 500.21 – Internal Server Error

处理程序“ExtensionlessUrlHandler-Integrated-4.0”在其模块列表中有一个错误模块“ManagedPipelineHandler”

 问题原因:没有注册asp.net 4.5.2到IIS

 解决方法:打开程序-运行-cmd:输入以下命令重新注册IIS

32位的Windows:

运行->cmd
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
aspnet_regiis.exe -i

64位的Windows:

运行->cmd
cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
aspnet_regiis.exe -i

如果解决问题,可以不看下面,这是解决上面问题后,又出现系统其他问题

 解决方法:

cmd(管理员身份)

  dism /online /enable-feature /featurename:IIS-ISAPIFilter
  dism /online /enable-feature /featurename:IIS-ISAPIExtensions
  dism /online /enable-feature /featurename:IIS-NetFxExtensibility45
  dism /online /enable-feature /featurename:IIS-ASPNET45

执行截图:

 最终可以访问了

 

 具体参考网站:

https://www.cheshirex.com/2012.html(解决500.21问题的)

http://t.zoukankan.com/oumi-p-12343559.html(解决系统不支持安装的)

posted @ 2022-05-05 17:17  小小邪  阅读(1910)  评论(1编辑  收藏  举报