TimSweet220
asked on
Try Catch question
I'm looking at this code:
protected void Page_Load(object sender, EventArgs e)
{
//Session["LoggedOut"] = true; removed trs 09/26/2011
//Session["IsLoggedIn"] = false; removed trs 09/26/2011
log4net.ThreadContext.Prop erties["Ac tion"] = "Logout";
log.Info("User Logged Out");
Response.Cookies[FormsAuth entication .FormsCook ieName].Ex pires = DateTime.Now.AddYears(-1);
FormsAuthentication.SignOu t();
Session.Abandon();
//Session.Clear();// hold trs 09/26/2011'
Response.Redirect("~/weblo gin.aspx") ;
//FormsAuthentication.Redi rectToLogi nPage();
}
}
Would I need a try/catch for the response.redirect to sink the theardAbortException when it calls the response.end? What would that look like.
protected void Page_Load(object sender, EventArgs e)
{
//Session["LoggedOut"] = true; removed trs 09/26/2011
//Session["IsLoggedIn"] = false; removed trs 09/26/2011
log4net.ThreadContext.Prop
log.Info("User Logged Out");
Response.Cookies[FormsAuth
FormsAuthentication.SignOu
Session.Abandon();
//Session.Clear();// hold trs 09/26/2011'
Response.Redirect("~/weblo
//FormsAuthentication.Redi
}
}
Would I need a try/catch for the response.redirect to sink the theardAbortException when it calls the response.end? What would that look like.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER