Ejemplo n.º 1
0
        protected void Page_Init(object sender, EventArgs e)
        {
            GlobalHelpers.DisablePageCaching();
            if (!Page.Request.IsAuthenticated || UserSessionManager.LoggedOnUser == null)
            {
                Session.Abandon();
                Session.Clear();
                FormsAuthentication.SignOut();
            }

            if (UserSessionManager.LoggedOnUser == null)
            {
                FormsAuthentication.SignOut();
                UserSessionManager.DestroyedUserSession();
                Response.Redirect(FormsAuthentication.LoginUrl);
                Response.End();
            }
        }
Ejemplo n.º 2
0
 protected void lnlLogout_Click(object sender, EventArgs e)
 {
     UserSessionManager.DestroyedUserSession();
     FormsAuthentication.RedirectToLoginPage();
 }