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:
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.
[ValidateAntiForgeryToken] public ViewResult Action_Method() { }
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Hi 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.