CustomErrors does not work when setting redirectMode=“ResponseRewrite”

前端 未结 10 2096
野趣味
野趣味 2020-11-27 11:51

In a old site, I was changing the way that CustomErrors works by adding redirectMode=\"ResponseRewrite\" (new in 3.5 SP1):



        
10条回答
  •  孤街浪徒
    2020-11-27 12:31

    I know this question is a bit old, but I thought I should point out that it doesn't need to be a static file to get this working.

    I ran into a similar thing, and it's just a matter of finding that error in your Error.aspx, in our case it was because the masterpage in use relied on a piece of session data and when ResponseRewrite was set the session is not available to our Error.aspx page.

    I haven't worked out yet whether this unavailability of session is due to our specific app config or a "by design" part of ASP.net.

提交回复
热议问题