[英]Register .NET 4.5 IIS 10 Windows 10
我已经看了几个小时了,但我无法修复它。
I have a .NET 4.5 web site and API and I'm working on Windows 10. I have VS2012 Pro installed and VS2015 Community installed.
检查 Web 平台安装程序,它表明我已经安装了 .NET 4.5。
Everytime I open the API or Web Site solutions it informs me that .NET 4.5 & IIS aren't configured and my applications wont run.
我已经尝试按照 MS 运行这些命令:
dism /online /enable-feature /all /featurename:IIS-ASPNET45
而且我仍然收到一些错误报告。 我读过的所有内容都表明上述命令应该可以解决问题,但事实并非如此。 除了上面列出的命令之外,我找不到关于该主题的任何其他内容。
似乎有很多人都在说同样的事情,但没有有效的解决方案(至少到目前为止对我来说)。 .NET 4.5 未在Add Features to Windows
。
如何让这个工作,以便 ASP.NET 4.5 和 IIS 工作?
我在VS 2015中遇到了同样的问题,我的情况是:
结果是404错误。
修理:
dism /online /enable-feature /all /featurename:IIS-ASPNET45
可爱的200回复......
似乎这实际上是一个错误。 尽管命令实际工作,但是一旦安装了.NET 4.6,旧版Visual Studio就会遇到问题。
Microsoft已针对所有受影响的Microsoft Visual Studio版本发布了修复程序。
修理:
以管理员身份打开VS2015的开发人员命令提示符
运行dism /online /enable-feature /all /featurename:IIS-ASPNET45
操作成功完成
你可以试试这个命令(使用 CMD 以管理员身份运行):
dism /online /enable-feature /featurename:IIS-WebServerRole
dism /online /enable-feature /featurename:IIS-WebServer
dism /online /enable-feature /featurename:IIS-ApplicationDevelopment
dism /online /enable-feature /featurename:IIS-ISAPIFilter
dism /online /enable-feature /featurename:IIS-ISAPIExtensions
dism /online /enable-feature /featurename:NetFx4Extended-ASPNET45
dism /online /enable-feature /featurename:IIS-NetFxExtensibility45
dism /online /enable-feature /featurename:IIS-ASPNET45
或使用 Powershell 以管理员身份运行:
dism /online /enable-feature /featurename:IIS-WebServerRole /featurename:WAS-WindowsActivationService /featurename:WAS-ProcessModel /featurename:WAS-NetFxEnvironment /featurename:WAS-ConfigurationAPI /featurename:IIS-ApplicationDevelopment /featurename:IIS-ASPNET /featurename:IIS-DefaultDocument /featurename:IIS-NetFxExtensibility /featurename:IIS-ISAPIExtensions /featurename:IIS-ISAPIFilter /featurename:IIS-RequestFiltering /featurename:IIS-Metabase /featurename:IIS-WMICompatibility /featurename:IIS-LegacyScripts /featurename:IIS-IIS6ManagementCompatibility /featurename:IIS-WebServerManagementTools /featurename:IIS-HttpTracing
确保执行后没有错误。 如果出现错误,这很容易,您只需根据出现的错误消息手动安装必备功能即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.