【发布时间】:2017-12-12 01:33:56
【问题描述】:
我们无法在 Windows 10 上启用 ASP.NET 4.5。我们需要启用它,以便在 IIS 上运行 ASP.NET Web 应用程序。
我们正在使用 IIS v 10.0.16299.15 并运行 Windows 10 Pro。
我们已尝试使用“打开或关闭 Windows 功能”。
Internet Information Services
World Wide Web Services
Application Development Features
ASP.NET 4.7
以上似乎可行;它说,“Windows 完成了请求的更改”,并要求我们重新启动计算机。重新启动后,当我们返回“打开或关闭 Windows 功能”时,ASP.NET 4.7 被列为禁用(而我们希望它被启用。)
我们也尝试过使用 DISM 命令行工具。
PS C:\> dism /online /enable-feature /all /featurename:IIS-ASPNET45
Deployment Image Servicing and Management tool
Version: 10.0.16299.15
Image Version: 10.0.16299.64
Enabling feature(s)
[==========================100.0%==========================]
Error: 50
The operation is complete but IIS-ASPNET45 feature was not enabled.
A required parent feature may not be enabled. You can use the /enable-feature /all option to automatically enable each parent feature fr
om the following list. If the parent feature(s) are already enabled, refer to the log file for further diagnostics.
IIS-ISAPIFilter, IIS-ISAPIExtensions, IIS-NetFxExtensibility45
The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
我们如何在 Windows 10 上启用 ASP.NET 4.5?
我们在这里Register .NET 4.5 IIS 10 Windows 10 尝试了答案。不幸的是,从 VS 2017 的开发人员命令提示符 运行 dism /online /enable-feature /all /featurename:IIS-ASPNET45 会导致相同的错误。
编辑:
这些是日志文件中的警告和错误消息。
2017-12-11 18:07:47,警告 DISM DISM OS 提供程序:PID=11888 TID=11856 无法将 DLL 搜索路径设置为服务堆栈文件夹。 C:\Windows 可能未指向有效的 Windows 文件夹。 - CDISMOSServiceManager::Final_OnConnect
2017-12-11 18:07:47,警告 DISM DISM 提供程序存储:PID=11888 TID=11856 无法加载提供程序:C:\Users\MY_USER\AppData\Local\Temp\382E1E51-CDE6-4CFC -8840-8EC85D283DB5\PEProvider.dll。 - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2017-12-11 18:07:47,警告 DISM DISM 提供程序存储:PID=11888 TID=11856 无法加载提供程序:C:\Users\MY_USER\AppData\Local\Temp\382E1E51-CDE6-4CFC -8840-8EC85D283DB5\EmbeddedProvider.dll。 - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2017-12-11 18:07:48,错误 DISM DISM 包管理器:PID=11888 TID=11856 必须先启用父功能,然后才能启用此功能。 "IIS-ASPNET45" - CPackageManagerCLIHandler::Private_ProcessFeatureChange
2017-12-11 18:07:48,错误 DISM DISM 包管理器:PID=11888 TID=11856 无法启用一项或多项功能。 - CPackageManagerCLIHandler::Private_ProcessFeatureChange(hr:0x80070032)
2017-12-11 18:07:48,错误 DISM DISM 包管理器:PID=11888 TID=11856 处理命令启用功能时失败。 - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x80070032)
【问题讨论】:
-
日志是怎么说的?
-
@derloopkat 我将开始添加有关日志的更多详细信息。谢谢你的提问。
-
您可能有兴趣在serverfault.com发布您的问题
-
我已经对其进行了测试,对我来说该命令运行良好。
-
原来我的Windows10系统损坏了。恢复操作系统解决了这个问题。
标签: asp.net iis windows-10