无效
我的Web.config包含以下内容:
我不想显示默认的ASP.NET错误页面,所以我清除了我的响应:
protected void Application_EndRequest(object sender, EventArgs e) { if (Response.StatusCode >= 400) { Response.Clear(); } }
这将停止显示默认的ASP.NET错误页面。 不幸的是,我的自定义错误页面也没有出现。 即使我的响应为空, PassThrough
也不会执行我的自定义错误页面路径(没有命中断点)。 如果我使用existingResponse="Replace"
,一切正常,但为什么它不适用于PassThrough
?