Beispiel #1
0
 protected void LogoutMe(object sender, EventArgs e)
 {
     if (Session["USERID"] != null)
     {
         BLL_Infra_UserCredentials objBLL = new BLL_Infra_UserCredentials();
         try
         {
             objBLL.End_Session(int.Parse(Session["USERID"].ToString()));
         }
         catch { }
         finally { objBLL = null; }
     }
     FormsAuthentication.SignOut();
     Session.RemoveAll();
     Session.Abandon();
 }
Beispiel #2
0
    protected void hlnk1_Click(object sender, EventArgs e)
    {
        if (Session["USERID"] != null)
        {
            BLL_Infra_UserCredentials objBLL = new BLL_Infra_UserCredentials();
            try
            {
                objBLL.End_Session(int.Parse(Session["USERID"].ToString()));
            }
            catch { }
            finally { objBLL = null; }
        }
        System.Web.Security.FormsAuthentication.SignOut();
        Session.RemoveAll();
        Session.Abandon();

        Response.Redirect("~/Account/Login.aspx");
    }