Error : Operation is not valid due to the current state of the object.
Stack Trace:
|
This error occurs when form fields are very large in numbers.By default, the maximum value of MaxHttpCollection is 1000.
Solution:
To solve this error, increase MaxHttpCollection value. Try adding the following setting in your web.config's <appsettings> block.
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="3000" />
</appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="3000" />
</appSettings>
you can change the value accordingly as per your need.