[RESOLVED]Decrypted Anti-forgery token

hi All,

I got an error below,

The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the configuration specifies explicit encryption and validation
keys. AutoGenerate cannot be used in a cluster.

Note: i used two form in single page with Anti-forgery token.

Thanks,

Jai.

Can you please post your code focusing on where you are generating the token and how are you decrypting the token (like using attributes etc)

Hi jayakumarvin,

Thanks for your post.

jayakumarvinayagam

The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the configuration specifies explicit encryption and validation keys. AutoGenerate
cannot be used in a cluster.

Please check this:http://iamdotnetcrazy.blogspot.com/2013/08/how-to-solve-anti-forgery-token-could.html

Add the following to your site’s web.config file

<configuration>
   <system.web>
     <machineKey decryptionKey="Decryption key goes here, IsolateApps" 
                 validationKey="Validation key goes here, IsolateApps" />
   </system.web>
 </configuration>

If there’s anything else I can do for you regarding this matter,please feel free to post  back in this forum.

Best Regards,

Eileen

Leave a Reply