I\'m just wrapping up a college project, I\'m not sure if I\'ve been staring at my computer for too long and am missing something obvious, but when I try to log a user out, I\'m
You use a link ( tag) to log off which results in HTTP GET request when user clicks on it, but your action is constrained to serve POST request only (because it is decorated with
[HttpPost]
attribute).
You either need to put your link into a form and generate POST request, or remove [HttpPost]
and [ValidateAntiForgeryToken]
(credits to GalacticCowboy) from your action.