我正在配置一个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)而不需要额外的步骤?


当前回答

运行cmd 将Aspnet_regiis.exe拖放到命令提示符中: C:\Windows\ Microsoft.NET \ Framework64 \ v2.0.50727 \ type -i(例如Aspnet_regiis.exe -i) 回车 等待该过程完成

好运!

其他回答

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

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

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

我为。net 4添加了ISAPI/CGI路径。这并没有解决问题。 因此,我随后对. net V4(客户端和扩展版)安装进行了修复。它要求重启。这为我解决了问题。

在某些情况下,发生此错误是因为ASP . net的Microsoft . net Framework 4.0配置已被损坏,如果在Visual Studio 2010或Microsoft SQL Server 2008之前安装了Microsoft Visual Studio 2012,则可能发生此错误。

在尝试了不同的事情后,我得出结论,通过运行以下命令修复您的. net安装。欲了解更多信息,请点击链接。

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SetupCache\v4.5.51209\setup.exe /repair /x86 /x64 /ia64 /norestart

https://msdn.microsoft.com/en-us/library/hh168535 (v = nav.80) . aspx

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

我找到了修复这个问题的文章,只需在命令提示符下运行以下命令:

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

如果系统是32位的,它应该是这样的:

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

但是,当我尝试使用命令提示符执行这些命令时,我得到了以下错误/警告消息:

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.exe 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 8.1上修复这个问题,我建议做以下事情。

解决方案:

Goto:打开或关闭Windows功能-> Internet Information Services -> World Wide Web Services -> Application Development features ->开启或关闭ASP。NET 4.5

这应该能解决问题。

我尝试在命令提示符中做aspnet_regiis,但我得到的答案是我没有管理权限。 然后,在更多的谷歌搜索和寻找解决方案后,我尝试右键单击cmd并以管理员身份运行它。确认是,当出现对话框时,再次运行aspnet_iis,效果很好。 简而言之: 1. 检查。net框架在app_pool 2. 以管理员身份运行CMD 3.执行aspnet_regiis -i命令