ThreadAbortException
-
Hey all - is it common to get ThreadAbortExceptions on redirects? My code is as follows:
User currentuser = UserAuthenticate.Auth( Convert.ToInt32(txtStoreID.Text), txtUsername.Text, txtPassword.Text, Request.ServerVariables["Remote_Addr"].ToString() ); Session["storeduser"] = currentuser; Response.Redirect("FrameParent.htm"); // <-- bombs with a ThreadAbortException
I put everything in some try catch blocks but I'm still not sure what the nature of the exception is -try{ User currentuser = UserAuthenticate.Auth( Convert.ToInt32(txtStoreID.Text), txtUsername.Text, txtPassword.Text, Request.ServerVariables["Remote_Addr"].ToString() ); Session["storeduser"] = currentuser; Response.Redirect("FrameParent.htm", false); } catch(ThreadAbortException err){ // nothing doing - } catch(Exception err){ lblError.Text = "Error Logging In "; }
*->>Always working on my game, teach me *->>something new. cout << "dav1d\n"; -
Hey all - is it common to get ThreadAbortExceptions on redirects? My code is as follows:
User currentuser = UserAuthenticate.Auth( Convert.ToInt32(txtStoreID.Text), txtUsername.Text, txtPassword.Text, Request.ServerVariables["Remote_Addr"].ToString() ); Session["storeduser"] = currentuser; Response.Redirect("FrameParent.htm"); // <-- bombs with a ThreadAbortException
I put everything in some try catch blocks but I'm still not sure what the nature of the exception is -try{ User currentuser = UserAuthenticate.Auth( Convert.ToInt32(txtStoreID.Text), txtUsername.Text, txtPassword.Text, Request.ServerVariables["Remote_Addr"].ToString() ); Session["storeduser"] = currentuser; Response.Redirect("FrameParent.htm", false); } catch(ThreadAbortException err){ // nothing doing - } catch(Exception err){ lblError.Text = "Error Logging In "; }
*->>Always working on my game, teach me *->>something new. cout << "dav1d\n";It's normal. When you redirect inside a try block it has to abort the thread the request is currently running on to move on to the next page. Jarrod Marshall