浏览 .php 扩展名时,Global.asax 中的 Application_Error 事件不会触发

发布于 2024-09-18 13:39:39 字数 326 浏览 8 评论 0原文

ASP.NET global.asax Application_Error 对除 .php 扩展名之外的所有页面都会触发。

在 IIS 上:

  • “Web 服务扩展”确实已将 PHP 设置为允许。
  • 我的网站上有 PHP isapi 过滤器。
  • 我回收了我的defaultAppPool。
  • IIS重置了吗?

当查看不存在的 php 页面时,我仍然无法触发 Application_Error 。 当浏览到确实存在的 php 文件时,浏览器会完美地显示它。

有什么想法吗?

谢谢! 槊

ASP.NET global.asax Application_Error fires for all pages except .php extensions.

On IIS:

  • "Web Service Extensions" does have PHP set to allowed.
  • I have the PHP isapi filter on the web site.
  • I recycled my defaultAppPool.
  • Did the IIS reset.

Still i cannot get the Application_Error to fire when viewing a php page that does not exist.
When browsing to a php file that does exist the browser displays it perfectly.

Any ideas out there?

Thanks!
Lance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧情勿念 2024-09-25 13:39:39

嗯,global.asax 仅由 iis 的 asp.net 后端触发。 PHP 编译器与此无关,并使用完全不同的编译器等。

换句话说:不可能。从架构的角度来看,我想知道为什么你会想要这样。

Uhm global.asax is only fired by the asp.net backend of iis. The PHP compiler has nothing to do with that and uses an totally different compiler etc.

In other words: not possible. And from an architectural standpoint I'm wondering why you would even want that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文