Error in create Asp.net

Asked

Viewed 133 times

2

Unable to decrypt anti-counterfeiting token. If this application is hosted by a Web Farm or cluster, ensure that all the computers run the same version of ASP.NET Web Pages and that the configuration specify validation keys and explicit encryption. Cannot use Autogenerate on a cluster.

After searching in google solution I could not find solution, how can I solve?

  • Explain your problem better

  • I have a huge form, I broke it using partial view, in several pages, when trying to insert a button create and submit form in any of the pages get this error

  • 1

    And what does this have to do with create? , present your code... But it seems your problem is related to Antiforgery Token... Where and when you receive this error message

1 answer

2


That’s because you don’t have the @Html.AntiForgeryToken() in the form or have in duplicate (by the various partial views).

  • That’s right I removed. The Antiforgerytoken() and was solved

  • 1

    @This is recommended to use and not remove. Make sure you have both in the view and in the controller. Probably made a mistake because you only set it for one of them...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.