【问题标题】:ASP.NET IIS 7.5 HTTP 500.21 errorASP.NET IIS 7.5 HTTP 500.21 错误
【发布时间】:2014-04-09 03:14:43
【问题描述】:

我在设置本地站点时遇到问题。

该项目使用 ASP.NET Framework 4.0,我的 DefaultAppPool 可以将 4.0 与集成的托管管道模式一起使用。

这是我得到的错误:

HTTP Error 500.21 - Internal Server Error
Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

Module  IIS Web Core
Notification    ExecuteRequestHandler
Handler PageHandlerFactory-Integrated
Error Code  0x8007000d
Requested URL   http://localhost:80/default.aspx
Physical Path   C:\Snugabye\Website\default.aspx
Logon Method    Anonymous
Logon User  Anonymous

Most likely causes:
Managed handler is used; however, ASP.NET is not installed or is not installed completely.
There is a typographical error in the configuration for the handler module list.

Things you can try:
Install ASP.NET if you are using managed handler.
Ensure that the handler module's name is specified correctly. Module names are case-sensitive and use the format modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule".

在控制面板 -> 程序 -> 打开/关闭窗口功能我看到的只是 Microsoft .NET Framework 3.5.1,没有任何关于 4.0 的内容是我遗漏的吗?

【问题讨论】:

  • 请问是什么风格/版本的 Windows/SP?
  • Dipak Patil 和 iberodev 都发布了引导我解决问题的答案。您会考虑将您的问题标记为已解决吗?还是你还有这个问题?

标签: asp.net iis


【解决方案1】:

您是否在 IIS 中注册了 .NET? 如果不运行以下命令:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

您需要从提升的命令提示符(...以管理员身份运行)执行此操作。

【讨论】:

  • 和医生开的完全一样!
【解决方案2】:

我猜这是基于您在 Windows 7 上的 .NET 版本。

根据.NET 4.0 Versions and Dependencies

(.NET 4.0) 不作为 Windows 操作系统的一部分安装,但可以 在 Windows XP、Windows Server 2003 和更高版本上单独安装 Windows 版本。

关注link for an installer of .NET 4.0

安装后您可能需要进行额外的配置。见this blog post

链接丢失时的博文摘录:

在机器上安装 .NET Framework 4.0 后,您需要对 IIS 进行一些配置更改,以运行 ASP.NET 4.0 页面:

首先将应用程序池设置为在 ASP.NET v4.0“模式”下运行。

然后您需要允许 ASP.NET v4.0.x 运行。这是在服务器级别的 ISAPI 和 CGI​​ 限制中完成的。

(转到管理工具 > Internet 信息服务管理器 > 单击服务器。然后打开 ISAPI 和 CGI​​ 限制 > 查找 ASP.NET V4.0.XXX 确保将限制设置为允许。如果设置为不允许,双击它,并检查允许扩展路径执行。点击确定。

注意:根据安装顺序,您可能还需要从命令行运行 aspnet_regiis.exe -i 才能在 IIS 上“重新安装”ASP.NET。

Instructions for configuring ISAPI and CGI restrictions for IIS 7.5 on various Windows flavors.

【讨论】:

  • 当我安装 .NET 4.0 时,它显示 Same or higher version of .NET Framework 4 has already been installed on this computer. 我应该卸载并重试吗?
  • 不,请参阅添加到此博客文章中的答案中的其他配置选项:frejnorling.wordpress.com/2011/02/13/…(在答案编辑中也提到。)
  • 我不知道 ISAPI 和 CGI​​ 是什么。
  • @user1269625:查看此链接:iis.net/configreference/system.webserver/security/… 现在也是答案的一部分。
  • @user1269625:添加。添加到答案的配置步骤:转到管理工具 > Internet 信息服务管理器 > 单击服务器。然后打开 ISAPI 和 CGI​​ 限制 > 查找 ASP.NET V4.0.XXX 确保限制设置为允许。如果设置为不允许,请双击它,然后检查允许执行扩展路径。点击确定。
【解决方案3】:

我也面临同样的问题。当我查看 App pool.NET 框架版本时,它是 v2.0。我的应用程序与 4.0 兼容。我运行了以下已解决问题的命令,现在我可以获取我的网络服务了

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

但是在运行这些命令后,默认的 .NET 框架也更改为 v4.0

【讨论】:

  • 基本上重复了下面的答案,对吧? :P
  • 使用aspnet_regiis -ir 会安装 ASP.NET 版本,但不会将任何 Web 应用程序更改为此版本。
【解决方案4】:

您必须将 IIS 注册到框架 4 才能正确执行它。 您必须按照下面给出的开始菜单获取 VS(已安装版本)命令提示符 开始->所有程序->Microsoft Visual Studio(安装版)->Visual Studio工具->Visual Studio命令提示符(安装版)

有关详细信息,请尝试以下链接: https://forums.asp.net/t/1587832.aspx?Problem+with+ExecuteRequestHandler+in+iis7

【讨论】:

    猜你喜欢
    • 2012-08-17
    • 1970-01-01
    • 2015-10-18
    • 1970-01-01
    • 1970-01-01
    • 2017-01-27
    • 2011-05-16
    • 2016-10-10
    • 1970-01-01
    相关资源
    最近更新 更多