Interviews2 answers
What is the use of AntiForgeryToken() in Asp.Net MVC?
2 Answers
By using AntiForgeryToken(), We can prevent the XSRF(Cross Site Request Forgery) in MVC.
Komara ReddyPosted Feb 20, 2017, 11:02 AM EST
By using AntiForgeryToken(), we can prevent the XSS(Cross site scripting)
@using(Html.BeginForm())
{
@Html.AntiForgeryToken()
}
Komara ReddyPosted Sep 22, 2016, 2:21 AM EDT