Combining HttpPost and ValidateAntiForgeryToken

added by DotNetKicks
9/8/2016 1:19:18 PM

2 Kicks, 519 Views

I've been kicking around the idea of combining [HttpPost] and [ValidateAntiForgeryToken] in an application using authentication cookies. Both attributes typically appear together to prevent cross-site request forgeries in MVC applications using cookie based authentication. The result looks like the following.