Can i put Response.Redirect("errorpage.aspx") in Application_Error()?
-
In Global.asax, I have put... void Application_Error(object sender, EventArgs e) { Exception objErr = Server.GetLastError().GetBaseException(); ErrorLog.WriteError(objErr.Message);//Fn Write error into text file Response.Redirect("~/admin/ErrorPage.aspx"); } When error occure then all loggedin user got redirect to errorpage?or only the use who got error is redirect to error page?please give reply ASAP. Thanks in advance.
!- F - R - I - E - N - D - S -!
-
In Global.asax, I have put... void Application_Error(object sender, EventArgs e) { Exception objErr = Server.GetLastError().GetBaseException(); ErrorLog.WriteError(objErr.Message);//Fn Write error into text file Response.Redirect("~/admin/ErrorPage.aspx"); } When error occure then all loggedin user got redirect to errorpage?or only the use who got error is redirect to error page?please give reply ASAP. Thanks in advance.
!- F - R - I - E - N - D - S -!
-
Thanks for reply...can u give some explaination? I think this event is called at application level.
!- F - R - I - E - N - D - S -!
-
In Global.asax, I have put... void Application_Error(object sender, EventArgs e) { Exception objErr = Server.GetLastError().GetBaseException(); ErrorLog.WriteError(objErr.Message);//Fn Write error into text file Response.Redirect("~/admin/ErrorPage.aspx"); } When error occure then all loggedin user got redirect to errorpage?or only the use who got error is redirect to error page?please give reply ASAP. Thanks in advance.
!- F - R - I - E - N - D - S -!
-
In Global.asax, I have put... void Application_Error(object sender, EventArgs e) { Exception objErr = Server.GetLastError().GetBaseException(); ErrorLog.WriteError(objErr.Message);//Fn Write error into text file Response.Redirect("~/admin/ErrorPage.aspx"); } When error occure then all loggedin user got redirect to errorpage?or only the use who got error is redirect to error page?please give reply ASAP. Thanks in advance.
!- F - R - I - E - N - D - S -!
Use public void Page_Error(Object sender, EventArgs e) Event in your all Page.. Or Write a Class inherited from System.Web.UI.Page say Base.cs and write the Page_Error Event there and Inherit your all Page from from Base