Operation is not valid due to the current state of the object.
Error : Operation is not valid due to the current state of the object.
When there is a postback with large number of form fields such error occurs.
Stack trace :
at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() at System.Web.HttpValueCollection.FillFromEncodedBytes
By default, the maximum value of MaxHttpCollection is 1000.
To solve this error, increase the MaxHttpCollection value. Try adding the following setting in your web.config’s <appsettings> block.
<appSettings>
<add key=”aspnet:MaxHttpCollectionKeys” value=”2001″ />
</appSettings>
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
Comments