I want to know what is benefit to using [ValidateAntiForgeryToken] in above of our controller view . Here i want to give a snapshot of login partial view:
Please can anyone give me a solution.
Thank you.
Home / DeveloperSection / Forums / What is use of [ValidateAntiForgeryToken] in ASP.NET MVC Views
Anupam Mishra
21-Mar-2016Hi Sachin,
I have generally use AntiForgeryToken for prevents external get requests. So no one can access outside.
When we submit form, we sends data to your Controller method. If method has ValidateAntiForgeryToken attribute, it validates if data we are sending has our ForgeryToken. ForgeryToken is generated once per session.