anti forgery token asp global asax file
hi all, currently i try to implement the anti forgery token following microsoft article (the csrf and ajax section).
https://learn.microsoft.com/en-us/aspnet/web-api/overview/security/preventing-cross-site-request-forgery-csrf-attacks
so if i make a post request to my form, the anti forgery token will be send from my javascript file to asp controller.
here's the implementation i did :
my controller :
to enable the anti csrf token by default in global asax file, do we need to add CustomAntiForgery into the Application_Start() method?
so it looks like this
https://learn.microsoft.com/en-us/aspnet/web-api/overview/security/preventing-cross-site-request-forgery-csrf-attacks
so if i make a post request to my form, the anti forgery token will be send from my javascript file to asp controller.
here's the implementation i did :
my controller :
to enable the anti csrf token by default in global asax file, do we need to add CustomAntiForgery into the Application_Start() method?
so it looks like this