Esempio n. 1
0
        public void SetCookie(string userName)
        {
            var userCookie = CmsUser(userName).ToDictionary();
            var cookie     = new ManageCookie();

            cookie.RemoveCookie("APPUSER");
            cookie.SetCookie("APPUSER", userCookie);
            LoginTime(userName);
        }
Esempio n. 2
0
        public void SetCookie(string userName)
        {
            var login      = LoginTime(userName);
            var user       = AppUser(login);
            var userCookie = user.GetBySerial();
            var cookie     = new ManageCookie();

            cookie.RemoveCookie("AzRADMINUSER");
            cookie.SetCookie("AzRADMINUSER", userCookie);
        }
        private void RemoveCookie()
        {
            BaseHepler.LogOutTime(User.Identity.GetUserId <int>());
            var cookie = new ManageCookie();

            cookie.RemoveCookie("APPUSER");
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-364));
            Response.Cache.SetNoStore();
            Session.Clear();
            Session.Abandon();
            AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
        }