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(); } }
protected void lnlLogout_Click(object sender, EventArgs e) { UserSessionManager.DestroyedUserSession(); FormsAuthentication.RedirectToLoginPage(); }