Monday, January 23, 2012

Operation is not valid due to the current state of the object. - asp.net C# listview

If your website receives the error "Operation is not valid due to the current state of the object.", it is due to your list view returning a large set of data that exceeds the threshold.

This issue is due to a Microsoft security update on 1/17/2012.

Resolution(s) (do one of the following):
1. Add pagination to your list view
2. Add filtering so the list view returns less rows
3. Update your web.config file to contain a new appSettings key/value:

No comments:

Post a Comment