mardi 1 décembre 2015

ASP.NET MVC 5 - Disable AntiForgeryToken refresh on every page load

I wanted to Disable AntiForgeryToken refresh on every page load. Instead it show come up with unique AntiForgeryToken for every browser session. Like CSRF in PHP Laravel.

I am clueless if there is any option to disable it on every page load or enable it to throw unique token for every broswer session.

Reason is i am using it in one of my SPA application which ultimately never reloads any page because of angular and ajax requests and the problem is when i successfully submit the form once to the server then AntiForgeryToken Expires and gives error.

Aucun commentaire:

Enregistrer un commentaire