Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I guess you are using ASP.NET AJAX. I am having the same problem. Sporadically I would find this exception in my Event Log, and the requested path is ALWAYS ScriptResource.axd.</p> <p>Using fixed validationKey and decryptionKey in machineKey did not fix the problem for me.</p> <p>Based on what I was able to gather, I tend to believe that this error has nothing to do with the ViewState whatsoever; my theory is that for some reason, certain UAs somehow mess up the "d" parameter of the ScriptResource.axd. The problem is easily replicable by requesting the offending path manually. This gives an "Invalid ViewState" exception, even though ViewState doesn't even apply here.</p> <p>Digging through my logs, I found for example:</p> <p><strong>This request is served OK (200):</strong> /ScriptResource.axd?d=oFCAB7_vUyp7Hhe9lxZBz37lpoAxhfbWwwdfFy3Zd3z41W_33Y_9Dq6i10g9Q1NRCY1n0_DNg1nE6-DDbsD6r4EiuwoeDzp9mjDDfBNLb1k1&amp;t=41df03cc</p> <p><strong>This slightly different request is also served OK (200):</strong> /ScriptResource.axd?d=oFCAB7_vUyp7Hhe9lxZBz37lpoAxhfbWwwdfFy3Zd3z41W_33Y_9Dq6i10g9Q1NR5ijsxQts4AfbJdACRwmQ8sHt6UAzui3spEnooPneTz01&amp;t=41df03cc</p> <p><strong>This request fails with a 500 response and the Invalid ViewState exception:</strong> /ScriptResource.axd?d=oFCAB7_vUyp7Hhe9lxZBz37lpoAxhfbWwwdfFy3Zd3z41W_3<strong>products$ctl00$AddToCart1$id</strong></p> <p>If you look closely, the first few characters on all three request are the same, but the last few characters of the last request (in bold) clearly is Control ID "products$ctl00$AddToCart1$id" (I have a controls named products and AddToCart). I don't know how this ID got there, but in my case this is what is causing all these Invalid ViewState exceptions.</p> <p>I'm not sure whether this is the same case as the OP or not, but I notice Martin's Request URL ends in "html", which is a bit of a coincidence for a parameter that is supposed to be a key...</p> <p>I already have a headache thanks to this problem. And so far, the most insightful post I came across is this one <a href="http://bytes.com/topic/asp-net/answers/861764-invalid-viewstate-system-string-decryptstringwithiv" rel="nofollow noreferrer">http://bytes.com/topic/asp-net/answers/861764-invalid-viewstate-system-string-decryptstringwithiv</a> </p> <p>Any insights?</p>
 

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