Ejemplo n.º 1
0
        /// <summary>
        /// 清除用户登录Cookie信息
        /// </summary>
        private void ClearLoginCookie()
        {
            FormsAuthentication.SignOut();

            #region 清除tcid

            HttpCookie aCookie = new HttpCookie("tcid");
            aCookie.Expires = DateTime.Now.AddDays(-1);
            Response.Cookies.Add(aCookie);

            #endregion

            var adminId = AuthorityHelper.GetId();
            if (adminId.HasValue)
            {
                CacheAccess.ClearPermissionCache(adminId.Value);
            }
        }