Beispiel #1
0
        public ActionResult Logout()
        {
            //Write to a file when user loggin
            Logger l = new Logger();

            using (StreamWriter w = System.IO.File.AppendText("C:\\Temp\\useraccess.log"))
            {
                l.LogToFile(", " + System.Web.HttpContext.Current.User.Identity.Name + ", logged out,", w);
            }
            authProvider.DeAuthenticate();
            return(RedirectToAction("Index", "Home", null));
        }
Beispiel #2
0
 public RedirectResult Logout()
 {
     authProvider.DeAuthenticate();
     return(Redirect("/Account/Login"));
 }
 public ActionResult Logout(string returnUrl)
 {
     Logger.Log(System.Web.HttpContext.Current.User.Identity.Name + ",Loggout", fileName);
     authProvider.DeAuthenticate();
     return(Redirect(returnUrl ?? Url.Action("Index", "Home")));
 }