浏览 .php 扩展名时,Global.asax 中的 Application_Error 事件不会触发
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,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.