The anti-forgery token could not be decrypted
(Created page with " 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 Pa...")
 
(Updated Edited template to July 12, 2025.)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<message>Write the content here to display this box</message>
  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 &amp;lt;machineKey&amp;gt; configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.
  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 &amp;lt;machineKey&amp;gt; configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.
The page produced by us contains an id (anitforgerytoken) - this is new each time.  
This page, produced by us, contains an ID (antiforgerytoken). It is new each time.  


It is generated from the a key value on the server (machineKey).
It is generated from a key value on the server (machineKey).


If you have a webfarm (more than one frontend) this key value on the server should be the same for all servers.
If you have a webfarm (more than one frontend), this key value on the server should be the same for all servers.


When [http://asp.net/ ASP.NET] gets a postback from a page with an antiforgerytoken it tries to verify it.
When [http://asp.net/ ASP.NET] gets a postback from a page with an anti-forgery token, it tries to verify it.


The goal is to avoid someone taking an old page and re-post multiple times.
The goal is to avoid someone taking an old page and re-posting it multiple times.


If you wait really long from page gen to postback the token may expire.
If you wait for a long time from page gen to postback, the token may expire.
[[Category:MDriven Server]]
{{Edited|July|12|2025}}

Latest revision as of 06:04, 20 January 2025

This page was created by Hans.karlsen@mdriven.net on 2023-03-07. Last edited by Edgar on 2025-01-20.
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 &lt;machineKey&gt; configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.

This page, produced by us, contains an ID (antiforgerytoken). It is new each time.

It is generated from a key value on the server (machineKey).

If you have a webfarm (more than one frontend), this key value on the server should be the same for all servers.

When ASP.NET gets a postback from a page with an anti-forgery token, it tries to verify it.

The goal is to avoid someone taking an old page and re-posting it multiple times.

If you wait for a long time from page gen to postback, the token may expire.