This is the error
Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
and I'm also getting these just about as often
The state information is invalid for this page and might be corrupted.
I've read about 20 other "Invalid postback or callback argument" question & answers, and I don't think mine falls into any of the common categories:
- Dynamically client-side created or changed controls that ASP.NET didn't know about
- Users submitting code or bits of code, eg "<" and ">" characters
- binding data in every Page_Load event without using if (!IsPostBack) judiciously
- faulty AJAX CascadingDropDown extender
- Russians trying to hack your site (!)
- Intermittent issues on users with dialup (!)
- Mismatch between ASP.NET versions, eg having a server farm with both ASP.NET 1.1 and 2.0 in use simultaneously
I THINK my issue's most similar to the last in this list.
I'm getting errors intermittently (but often) on my 2 Microsoft Azure web server load-balanced test environment upon form postbacks.
I notice the problem happens when a page produced by one of the servers is posted back to the other. When I take away the load balancing (just hitting one server only), the problem goes away.
I'm using Win Server 2008 R2 (IIS7.5) on one web server and Win Server 2012 (IIS8) on the other (I was familiar with 2008, and wary of 2012 but wanting to learn, so I chose to run one of each to hedge my bets, in case you're wondering).
The 2008 machine runs ASP.NET version "4.0.30319.272" and the 2012 one runs "4.0.30319.18010", but obviously different versions of IIS.
But they're both running ASP.NET 4.0. .NET is supposed to make the underlying operating system transparent, right? So I'm not that confident that this is causing the problem.
Re-building one server to make them the same would be quite a chore and would prefer to avoid it if the minor ASP.NET differences aren't the cause of the problem!
So are there any other reasons two servers won't accept each others' forms on postback? FYI, I've already added a entry into my web.config on both servers to fix "Validation of viewstate MAC failed" errors I was getting.
Or are there any config changes I could do to make the servers more compatible?
Thanks!