Friday, October 7, 2016

The anti-forgery cookie token and form field token do not match ASP.NET MVC 4

I resolved the issue by explicitly adding a machine key in web.config.

Note: For security reasons don't use this key. Generate one from Don't use online one, details,

 <machineKey validationKey="971E32D270A381E2B5954ECB4762CE401D0DF1608CAC303D527FA3DB5D70FA77667B8CF3153CE1F17C3FAF7839733A77E44000B3D8229E6E58D0C954AC2E796B" decryptionKey="1D5375942DA2B2C949798F272D3026421DDBD231757CA12C794E68E9F8CECA71" validation="SHA1" decryption="AES" />

Here's a site that generates unique Machine Keys:

No comments:
Write comments
Recommended Posts × +