ASP.Net Response.Redirect not working in Application_Error?

后端 未结 5 1927
萌比男神i
萌比男神i 2021-01-04 03:52

I don\'t know why the Response.Redirect not working properly when I deploy my code to IIS7? The white/yellow error page always get displayed instead of my Errors.aspx. But w

5条回答
  •  攒了一身酷
    2021-01-04 04:48

    I had the same problem and solved it with:

    HttpContext.Current.ClearError();             
    Response.Redirect("~/Error.aspx", false);
    return;
    

提交回复
热议问题