In this article, you will learn about the purpose of ValidateAntiForgeryToken in MVC application.
If you are developer, either fresher or experienced, you definitely have a little knowledge of Anti-Forgery Token in an MVC application. This is a built-in functionality provided by Microsoft. Developers often use it in their application. Everyone knows that this functionality is used for security purposes to stop attacks from hackers. But for a fresher, it is a little bit complicated to understand this concept and its functionality. In this article, I am trying to make it easy to understand this concept for those developers who are in the learning phase and confused with its functionality and purposes. What is CSRF? Let’s first understand what CSRF is. It could be defined as below. C S R F Cross Site Request Forgery Now, try to read this respectively. When you read these words one by one, then you will definitely understand its meaning. Cross Site Request forgery can be defined as, a forgery request, i.e a fraud or fake request, which comes on an authenticated site from a cross site and is treated as an authenticated request. This type of attack has been called a CSRF. For avoiding this situation, Microsoft provides us built-in functionality which we use in our application for security purposes, so no one can hack our site or invade some critical information. Live - Scenario
Hope you understand the concept and like the article. Happy Coding.
Hands on ASP.NET GridView