Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I finally figured out the last piece of the puzzle. When the app pool of my server was being recycled (configured by the hosting provider), the viewstate encryption key was being auto-re-generated. This meant that even though the cookies were valid &amp; non expired (pre-return visit), when the user returned the encyrption had changed, and the cookie was no longer valid.</p> <p>The solution was to manually specify a static validation key. The following link can be used to generate the neccessary web.config tag for this.</p> <p><a href="http://www.aspnetresources.com/tools/keycreator.aspx" rel="noreferrer">http://www.aspnetresources.com/tools/keycreator.aspx</a></p> <p><strong>UPDATE:</strong></p> <p>Here's a more configurable site to generate Machine Key</p> <p><a href="http://www.sourcetree.net/sourcetree/Development/Aspnet%20Examples/GenerateMachineKeyForWebConfig.aspx" rel="noreferrer">Source Tree - Generage attribute</a></p> <p>I realize that this might have a minor security impact, I guess theoritically it's safer to have a changing key in case your key gets brute forced and compromises any data you might be storing in the view state, but you probably shouldn't be storing sensitive information in the viewstate as it's not inherently safe anyway.</p> <p>Example:</p> <pre><code>&lt;configuration&gt; &lt;system.web&gt; &lt;machineKey validationKey="97CEB2D3DEBF853649EAB851F56F08BA328423F935C97244CF5300925B6FF7D2C43084C73CBAF19D5193755EF7F87A3FFC714675F9197C822BAEEC97E853B91E" decryptionKey="A72F69A4650348E3AA249A8179516D67C8553B3D4BD165B9" validation="SHA1" /&gt; &lt;/system.web&gt; &lt;/configuration&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload