Operation is not valid due to the current state of the object.

Add key="aspnet:MaxHttpCollectionKeys" value="2000" to the App settings for the above problem in Web.config.


Microsoft recently (12-29-2011) released an update to address several serious security vulnerabilities in the .NET Framework. One of the fixes introduced by MS11-100 temporarily mitigates a potential DoS attack involving hash table collisions. It appears this fix breaks pages that contain a lot of POST data. In our case, on pages that have very large checkbox lists.

For the above problem here some link for give detail why this happened and with proper solution.

(1) http://stackoverflow.com/questions/8832470/operation-is-not-valid-due-to-the-current-state-of-the-object-error-during-pos

(2) http://support.microsoft.com/kb/2656351

(3) http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c2b5c547-6a75-4696-a04c-d4ebc6481d769



Thanks & Regards
Gaurang Upadhyay