예제 #1
0
        public ActionResult Logout()
        {
            FormsAuthManager authManager = new FormsAuthManager();

            authManager.SignOut();
            //清除所有的 session
            Session.RemoveAll();
            ViewBag.Name = "Guest";
            return(RedirectToAction("Index"));
        }