asp.net-mvc-4 - aspnet_regiis.exe -ir 不适用于 Windows 8

标签 asp.net-mvc-4 iis-8

我正在尝试使用 IIS8 将 ASP.NET MVC3 应用程序部署到我的 Windows 8 机器上。当我尝试路由到该网站时,出现以下错误:

HTTP Error 403.14 - Forbidden

我能找到的关于这个问题的几乎所有内容都说要运行:

aspnet_regiis.exe -ir

当我在 Windows 8 机器上运行此程序时,我收到以下消息:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Users\Justin>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe
-ir
Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.
Start installing ASP.NET (4.0.30319.17929) without changing existing web 
applications to use this version of ASP.Net.  This option is not supported on 
this version of the operating system.  Administrators should instead install / 
uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, 
the Server Manager management tool, or the dism.exe command line tool.  For more 
details please see http://go.microsoft.com/fwlink/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.17929) without changing existing web 
applications to use this version of ASP.Net.

ASP.NET 4.5 已安装在我的系统上。

Windows Features

我的应用程序在 Visual Studio 中正确运行,但我无法部署它来挽救我的生命。我完全不知道从这里该去哪里。我也尝试过该网站的集成管道模式和经典管道模式。

最佳答案

运行以下命令,这将在 IIS 中安装并注册 ASP.NET 4.5:

dism /online /enable-feature /featurename:IIS-ASPNET45 /all

关于asp.net-mvc-4 - aspnet_regiis.exe -ir 不适用于 Windows 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12676002/

相关文章:

IIS 中央证书存储 - 出站流量

azure - 将 IIS 集中证书存储与 Azure 文件共享结合使用

asp.net-mvc - Asp.Net MVC 4 应用程序中的 Signalr

c# - MVC Action 链接问题

c# - 将 Controller 拆分为 2 个独立的 DLL

x509 - 我应该使用什么证书存储来存储用于签名/加密 JWT token 的证书?

asp.net - IIS 8 Express 上的 SQL 角色提供程序

php - Azure 网站 PHP 5.6 IIS 8.0 setlocale 函数问题

asp.net - AngularJS 和 ASP.Net 中的单页应用程序工作正常,但是当我在浏览器中刷新页面时,出现 404 错误

c# - 在没有启动的情况下在旧的 ASP.NET MVC 应用程序中创建 HttpClient