Session["Key"] = new User("Login"); //Save session value user = Session["Key"] as User; //Get value from session if (Session["Key"] == null){RedirectToAction("Login"); }