Skip to content

Instantly share code, notes, and snippets.

@MykolaPod
Created February 20, 2017 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MykolaPod/e00c27a05d2de9ca8aaacb72aa68f71e to your computer and use it in GitHub Desktop.
Save MykolaPod/e00c27a05d2de9ca8aaacb72aa68f71e to your computer and use it in GitHub Desktop.
Securing ASP.NET MVC application 13
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult LogOff()
{
PingObject value;
UsersPingResult.TryRemove(Session.SessionID, out value);
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
return RedirectToAction("Index", "Home");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment