I have couple of update panels and jquery tabs on page. And also I am loading couple user controls on update panels. After user waited for couple of minutes (not checked the
<add key="aspnet:MaxHttpCollectionKeys" value="100000"/ >
Add above key to Web.config or App.config to remove this error.
This solution is helpful too:
Add validateRequest="false"
in the <%@ Page
directive.
This is because ASP.net examines input from the browser for dangerous values. More info in this link
I had this issue when I upgraded my project to 4.5 framework and the GridView
had Empty Data Template. Something changed and the following statement which previously was returning the Empty Data Template was now returning the Header Row.
GridViewRow dr = (GridViewRow)this.grdViewRoleMembership.Controls[0].Controls[0];
I changed it to below and the error went away and the GridView started working as expected.
GridViewRow dr = (GridViewRow)this.grdViewRoleMembership.Controls[0].Controls[1];
I hope this helps someone.