项目场景:
发布IIS出现报错
问题描述
在运行时出现该界面,无法正常问题网页
如图所示
@Override
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
}
原因分析:
提示:这里填写问题的分析:
1、大概率是visual studio中没有安装ASP.net。
2、如过第一步安装完还是有报错,可能是没有注册asp.net 4.5.2到IIS
解决方案:
提示:这里填写该问题的具体解决方案:
1、在VS中安装asp.net
2、注册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
可以正常访问