May 19, 2012

'Operation is not valid due to the current state of the object' error during postback


'Operation is not valid due to the current state of the object' error during postback



I had a aspx page which was working well, but suddenly I am getting the error "Operation is not valid due to the current state of the object." whenever a postback is done.
The stack trace is:
at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()
at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding)
at System.Web.HttpRequest.FillInFormCollection()

Solution:


<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="10000" />
</appSettings> 

0 comments:

Post a Comment

Your comments:

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More