C # Template (SPA) does not run [closed]

1

I went to test the Single Page Application, using the visual studio template. Well, I created the project and did nothing, nothing at all, I just created the project and rode it and when running it gave me this error:

  

Severity Code Description Project File Line Suppression State   Error CS0246 The type or namespace name 'ValdiateAntiForgeryToken'   could not be found (are you missing a directive or an assembly   C: \ Projects \ Test_Pay \ Test_Password \ Controllers \ ManageController.cs 200 Active

The point is that the namespace: System.Web.Mvc is already in the project. If it's reference, which one do I add?

    
asked by anonymous 10.05.2017 / 18:18

1 answer

1

Apparently this is a typo - but not yours!

The expression ValdiateAntiForgeryToken present in the error message looks a lot like the ValidateAntiForgeryToken method, which should be the correct one.

You create applications and solutions in Visual Studio from a template, which is the basic definition of an empty project. Visual Studio provides several templates, not all from Microsoft, for you to create a "scratch" application. What appears to have occurred here is that the template author you are using has made a typo, so this will affect all developers using the same template.

I believe that correcting the error of the template author is the first step in getting your application working - but given such a basic error in a template made available to VS, I would be concerned about other errors that the template might have. / p>

On time: my degree of confidence in the correctness of official Microsoft templates is quite high. If I had to bet, I'd say that came from the Visual Studio gallery.

    
10.05.2017 / 18:39