0

I have a .Html page which allows the user to fill in a form and submit it, however in MVC we could use an AntiforgeryToken to insure the request has came from the correct place.

I'm currently studying AngularJS and I'm curious how I go about validating the same situation, I'm currently not using the .cshtml instead I have the plain .html page, I am however building this project within visual studio can someone shed some knowledge on how I go about using the AntiforgeryToken or something similar to validate each request via AngularJS

I have googled this but the responses I get and dicussing MVC.

Code Ratchet
  • 5,758
  • 18
  • 77
  • 141
  • There are lot to be _googled_ I guess. **[Google 1](http://techbrij.com/angularjs-antiforgerytoken-asp-net-mvc)**, **[Google 2](http://blog.novanet.no/anti-forgery-tokens-using-mvc-web-api-and-angularjs/)**, **[Google 3](http://stackoverflow.com/questions/32460196/angularjs-web-api-antiforgerytoken-csrf)**. I wonder did you miss these or they don't match your requirement.. :) – Guruprasad J Rao Apr 06 '16 at 12:31
  • @GuruprasadRao Just looking at google 1 option, the first part is the function GetAntiForgeryToken where does this part go exactly? I'm slightly confused. – Code Ratchet Apr 07 '16 at 09:09
  • **[Here is the link to download complete project](https://github.com/techbrij/angularjs-asp-net-mvc)**.. Please download and walkthrough.. – Guruprasad J Rao Apr 07 '16 at 09:54

0 Answers0