可以參見博客https://blog.csdn.net/feigning/article/details/91345140的方法,用dism工具注冊下
控制台會提示此操作系統不支持此選項,可以使用dism.exe命令行工具安裝.net 4.5
那么我們使用dism工具執行以下指令即可:
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
————————————————
此時部署webapi網站,還是無法訪問
接着重新通過控制面板選擇安裝iis,把該裝的都裝了,最后就好了