ASP.NET MVC 部署常见问题

IIS 发布后解除锁定

1、CMD管理员下运行命令
C:windowssystem32inetsrvappcmd unlock config -section:system.webServer/handlers
C:windowssystem32inetsrvappcmd unlock config -section:system.webServer/modules

2、由于先装.net 4.0以上版本,后装.net 4.0,需要重新注册.net 4.0
C:>cd windowsmicrosoft.netframework64v4.0.30319
aspnet_regiis.exe -i

3、Windows Server 2019 安装.Net Framework 4.5
cmd.exe下逐条运行
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

4、应用程序集启用32位

原文地址:https://www.cnblogs.com/chengeng/p/4098906.html