Beispiel #1
0
        public ActionResult logout()
        {
            User login = AuthBLL.GetUser();

            if (login != null)
            {
                Session.Abandon();
                HttpCookie ck = Response.Cookies["usr"];
                if (ck != null)
                {
                    ck.Expires = DateTime.Now.AddDays(-1);
                }

                Session["GuvenlikKodu"] = null;
                Session["kullanici"]    = null;
            }
            return(RedirectToAction("Welcome", "Login", new { area = "admin" }));
        }