Link to home
Start Free TrialLog in
Avatar of TimSweet220
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.Properties["Action"] = "Logout";
        log.Info("User Logged Out");
        Response.Cookies[FormsAuthentication.FormsCookieName].Expires = DateTime.Now.AddYears(-1);
        FormsAuthentication.SignOut();
        Session.Abandon();
        //Session.Clear();// hold trs 09/26/2011'
        Response.Redirect("~/weblogin.aspx");
        //FormsAuthentication.RedirectToLoginPage();
    }
}
 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
Avatar of richard_hughes
richard_hughes
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimSweet220
TimSweet220

ASKER

Perfect