November 2015
Intermediate to advanced
152 pages
2h 46m
English
Anti-forgery tokens or request verification tokens are used in ASP.NET MVC to avoid CSRF attack. Anti-forgery tokens or request verification tokens help in preventing the CSRF attacks. The .Net framework has a built-in support to create and validate anti-forgery tokens. The @Html.AntiForgeryToken() method in the MVC Razor engine creates the anti-forgery tokens. The validation of an anti-forgery token can be achieved by decorating the controller or action with the [ValidateAntiForgeryToken] attribute.
Let's see how the server accepts or rejects a request based on the anti-forgery token. Given in the following are the steps that are involved in making the anti-forgery ...
Read now
Unlock full access