[ASPNET]ASP.NET Event Validation and “Invalid Callback Or Postback Argument” Troubleshooting info

There are many community members encountering this problem. Symptom is just as the following exception on ASPX page when postback.

 

Invalid postback or callback argument. Event validation is enabled using <pages enableeventvalidation="true" /> 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.

 

The event validation is added from ASP.NET 2.0, Scott Allen has provided several good blog entries explaining it. The following two described the basic ideas and causes of this error:

 

ASP.NET Event Validation and “Invalid Callback Or Postback Argument” Part I

http://odetocode.com/Blogs/scott/archive/2006/03/20/3145.aspx

 

ASP.NET Event Validation and “Invalid Callback Or Postback Argument” : Part II

http://odetocode.com/blogs/scott/archive/2006/03/21/3153.aspx

 

In addition to the unexpected change of some html input data(such as <select> list) at client, there is another frequently happened cause:

 

Sometimes due to slow network tranmiting, the page is flushed to client-side gradually. And the client user may submit the page before the event validation’s <input type=’hidden’ /> field(just like the viewstate hiden field) rendered to client. Then, such postback will result to the exception at the beginning. This issue has also been well explained by Scott:

 

Event Validation Errors and Network Congestion in ASP.NET

http://odetocode.com/Blogs/scott/archive/2007/04/13/10696.aspx

 

some other causes may include:

 

l  There is some unregistered ActiveX control that cause page get rendered very slowly