我正在配置一个MVC 3项目,以在IIS的本地安装上工作,遇到了以下500个错误:

处理程序“PageHandlerFactory-Integrated”有一个坏模块 "ManagedPipelineHandler"在其模块列表中。

事实证明,这是因为ASP。Net没有完全安装IIS,即使我在“添加功能”对话框中勾选了该框。为了解决这个问题,我简单地在命令提示符下运行以下命令

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

如果我使用的是32位系统,它看起来会像下面这样:

%windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i

我的问题是,有没有一种方法可以在windows 7的机器上安装IIS来使用。net 4.0 (MVC 3)而不需要额外的步骤?


当前回答

要在Windows 8.1 Professional机器上修复此问题,请执行以下操作。

安装Web平台安装程序。http://www.microsoft.com/web/downloads/platform.aspx 在Web平台安装程序中安装ASP。NET 4.5(该特性有一个依赖项)。

如果你只是从最流行的答案中尝试前面提到的cmd提示命令,你会得到以下错误/警告消息:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -i Microsoft (R) ASP.NET RegIIS version 4.0.30319.33440 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.33440). This option is not supported on this version of the operating system. Administr ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Win dows Features On/Off" dialog, the Server Manager management tool, or the dism.e xe command line tool. For more details please see http://go.microsoft.com/fwlin k/?LinkID=216771. Finished installing ASP.NET (4.0.30319.33440).

其他回答

我也遇到了同样的问题,我的解决方案是:

进入“打开或关闭Windows功能”> Internet信息服务>万维网服务>应用程序开发功能>启用ASP。NET 4.5

我在Windows server 2012上也有类似的问题,在服务器管理器中安装“应用服务器”功能修复了这个问题。

要在Windows 8.1 Professional机器上修复此问题,请执行以下操作。

安装Web平台安装程序。http://www.microsoft.com/web/downloads/platform.aspx 在Web平台安装程序中安装ASP。NET 4.5(该特性有一个依赖项)。

如果你只是从最流行的答案中尝试前面提到的cmd提示命令,你会得到以下错误/警告消息:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -i Microsoft (R) ASP.NET RegIIS version 4.0.30319.33440 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.33440). This option is not supported on this version of the operating system. Administr ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Win dows Features On/Off" dialog, the Server Manager management tool, or the dism.e xe command line tool. For more details please see http://go.microsoft.com/fwlin k/?LinkID=216771. Finished installing ASP.NET (4.0.30319.33440).

如果你想在不安装MVC的情况下部署MVC应用程序,你可以在应用程序中部署MVC DLL。这就绕过了安装MVC 3。您可以使用一些. net 4.0名称空间中的特性,而无需使用类似的方法安装. net。

-使用应用程序初始化功能 -由于配置继承而请求错误的页面(.asp)

500.21只会出现在第一个用户连接上。后续连接正常。

通过纠正。net网站上的applicationInitialization url集合来解决。