I experience strange problem. We have error handling in global.asax that would redirect user on special page in case if error happened:
void Application_Error(object sender, EventArgs e)
{
.......
string pageError = "~/LastError.aspx?AfterNextClick=" + afterNextClick.ToString();
if (Request["guid"] != null)
pageError += "&guid=" + Request["guid"];
Server.Transfer(pageError);
}
Custom errors are turned off.
<customErrors mode="Off"/>
Most of the times the Application_OnError works perfectly and redirects users to the specific page, but sometimes, users are not redirected anywhere and an ASP.NET exception page is displayed.
So is there any situations in which Application_OnError in global.asax wouldn’t fire?
Probably an exception is ocurring inside the
Apllication_Errormethod. Take a closer look at the code you place in this method (where you placed …… ).Try placing a
try/catchblock in this method to debug what’s going on…