Inheritance: ServiceBase
Ejemplo n.º 1
0
        public ActionResult LogOut()
        {
            // Init home service
            var service = new HomeDataService();

            //Sharepoint host url
            string spHostUrl = SessionInfo.Current.SPContext.SPHostUrl.ToString();

            //clear the SP Context
            SessionInfo.Current.SPContext = null;

            // Logout the current token
            service.LogOut(SessionInfo.Current.AccessToken);

            // Clear the session
            Session.Abandon();

            return Redirect(spHostUrl);
        }
Ejemplo n.º 2
0
        public ActionResult LogOut()
        {
            // Init home service
            var service = new HomeDataService();

            // Logout the current token
            service.LogOut(SessionInfo.Current.AccessToken);

            // Clear the session
            Session.Abandon();

            // Redirect back to landing page
            return RedirectToAction("Index", "Home");
        }