为什么我的 global.asax 中的 Application_Error 没有捕捉到“500:内部服务器错误”?

Why doesn't Application_Error in my global.asax catch the “500:Internal server error”?

当返回带有 StatusCode (500) 的响应时,我的 Global.asax 中的 Application_Error sub 没有被触发。

在您的网络配置中处理它。 https://www.stokia.com/support/misc/web-config-custom-httperrors.aspx