c# - 在 ISAPI 筛选器上调用 LoadLibraryEx 失败

标签 c# php asp.net iis-7.5 isapi

我正在处理一个 PHP/C# Soap 服务项目,我在 IIS 中运行它时遇到问题,尽管它之前可以正常工作。

当我尝试转到 ASMX 文件或 WSDL 文件时,出现 IIS 错误:

HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter "C:\php\php5isapi.dll" failed

php5isapi.dll 位于错误中指定的位置,并且已添加到 IIS 中的 isapi 筛选器。我知道 PHP 工作正常,因为标准 .php 文件也是如此,但我不明白为什么 ASMX/WSDL 文件会访问 php5isapi dll,因为它不是 PHP。 soap 服务位于 C# ASMX Web 服务中。

这只发生在我在应用程序池中启用 32 位应用程序的原因。这必须是真实的,因为当它不是时,它会抛出一个 ASP 异常,说明 DLL 的格式不正确。

我知道实际服务工作正常,因为它在 Linux 上的 Mono 下运行正常,所以 IIS 只是出了点问题,但我看不出是什么。

感谢您提供的任何帮助。

最佳答案

这看起来是同一个问题,不是吗? https://bugs.php.net/bug.php?id=39163

“Gmail.com 上的 FreakTrap”提出了以下解决方案:

sneakers05's modification of the Application Pool's 32-bit setting also corrected the problem I was having with the php5isapi.dll.

For those of us getting the 'Calling LoadLibraryEx on ISAPI filter "C:\PHP\php5isapi.dll" failed' error after an attempted manual install:

1) 从全新的 IIS 安装开始,同时安装 ISAPI 过滤器和 启用扩展。

2) 在主要设置下 [在最顶部 您的 IIS 管理器的层次结构 View ,在应用程序池上方],添加 以下顺序:

  • 用于 php5isapi.dll 的 ISAPI 过滤器
  • php5isapi.dll 的 ISAPI 和 CGI​​ 限制条目
  • php5isapi.dll 的处理程序映射

3) 转到应用程序池部分。

4) 右键单击​​“默认应用程序池”并选择“高级设置”。

5) 将第二个选项 [Enable 32-Bit...] 设置为 True。

Also, it is important that your 'Default Website' not have any unique settings from the top-level configurations. This was causing my ISS to exhibit some pretty strange behavior, which is why I recommend that you first delete your default website and create a new one.

我觉得只是建议一个链接很糟糕,但看到没有太多事件,所以我认为它可能会有所帮助。

关于c# - 在 ISAPI 筛选器上调用 LoadLibraryEx 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14675301/

相关文章:

c# - 快速查找 List<T>

c# - C# 和 JavaScript 之间时间跨度差异的解释

c# - ASP.NET Server.MapPath 和 SharePoint 文档库

c# - 我如何与 mIRC 中的 c# .dll 对话?

c# - 使用 TableLayoutPanel 的可扩展列(来自代码)

php - 如何处理对 mySQL 数据库中一条记录的大量同时更新请求并确定谁先到达

php - 从网站提取图像的脚本

php - 在 HTML 表中显示 MySQL 记录。什么失败了?

asp.net - 在asp.net中使用SqlDataSource更新gridview

Asp.net MVC 可见/隐藏