Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi CP Experts

I am working on a webpage which consists of about 2000 to 3000 textboxes in gridviews. I fill in all the data and submit to database. The application works fine locally. But on the production server with public IP it gives me an error as
Operation is not valid due to the current state of the object.


Please help me resolve the issue.
Posted
Comments
Vijay Kr Sharma 18-Jan-12 6:19am    
At least provide code to observe the problem
bbirajdar 18-Jan-12 9:05am    
@Vijay ..Thanks for the concern.

Actually the problem is not with the code but with the deployment. if a page has more than 1000 submit elements, we get this error. So we need to explicitely specify the value in config and it works..

1 solution

Hi, Use this in web.config

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


I have used it and solve my problem.
 
Share this answer
 
Comments
bbirajdar 18-Jan-12 7:41am    
Thanks dude.. It worked for me.Just made a little change and placed value=9999 . My +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900