1
I was auditioning with 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 I circled and running 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 using Directive or an Assembly Reference? ) Teste_spa C: Teste_spa Teste_spa Controllers Managecontroller.Cs 200 Active
The point is that the namespace: System.Web.Mvc
is already in the project. If it is reference, which I add?
I believe it is an error in the project template, because
ValdiateAntiForgeryToken
does not exist - seems to be a typo onValidateAntiForgeryToken
.– Oralista de Sistemas
@Renan, I didn’t type anything. Just build the project and went to rotate to see his face, just this. Nothing was typed. The attribute was already there.
– pnet
That’s why I say the error is from the template. It looks like a typo from the author of the template, not yours. When you create a project through Visual Studio, you use a template (in this case, SPA), which has a responsible author. This is bad for Microsoft, which provides the template. I believe that fixing the error is a first step for the application to run.
– Oralista de Sistemas
@Renan This template is most likely not from Microsoft. For all effect, Renan is right, is a typo of who made the template, or the error message in the question is not exactly equal to what is shown to you.
– Jéf Bueno
@Renan, thanks. Now I understand what you meant by typo. I solved it. Thank you so much for the help and no resolution. We need this, to show us the way only and not do for us. Thanks. Put as an answer that mark the answer.
– pnet
@Renan, just one question. When I start the project, the page that comes is Login and not Index or Home and I can’t change it.
– pnet
@pnet may have specified some form of authentication by default - and as the user has never authenticated, it is directed to this page. I think it is worth opening a question just for this, and also check the web.config to see if there is something about the required form of authentication.
– Oralista de Sistemas