Just an FYI - if you recently (since 29th December 2011) started getting "Operation is not valid due to the current state of the object" errors on complex or involved forms this could wee be the reason why - a recent patch, as far as I can see, it's
http://support.microsoft.com/kb/2656351 put a maximum limit on the number of input objects in a form collection to either 500 or 1000 (there seems to be some debate on this), this can be increased by adding
a web.config key
It doesn't sound like this update is actually affecting you, it may be another update that was recently released. View the HTML code that is produced, and that when you submit the form generates this error - then count the number of <input ..... /> and
<select>...</select> elements that are in between the (or each, if there are more than one) <form>...</form> tags. If there are a lot of these (over 500 or 1000) then this is probably your problem, but I suspect (also, due to what you are saying the nature
of the form is) that this form will only have 8-10 of such elements - if this is the case then this update probably isn't causing your problem.
Please remember to mark replies as answers if you find them useful =8)
I am using VS to write SRS reports also for deploying Microsoft Reporting Services. After removing the latest security updates the SRS reports worked without getting the error "Operation is not valid due to the current state of the object". Is there a way
to do the security updates and not get this error on the SRS report?
I cannot directly answer but I want to offere you a starting point. The error I had was evidenced when I was doing async postback with a large datatable on page. I suspect you have same scenario. You need some way to allow more rows to return to calling
page. The above change to web.config does just this as the MS update reduces the # of rows? permitted. Good luck, Tom
mitchells
I am using VS to write SRS reports also for deploying Microsoft Reporting Services. After removing the latest security updates the SRS reports worked without getting the error "Operation is not valid due to the current state of the object". Is there a way
to do the security updates and not get this error on the SRS report?
I kept getting this error ever since the KB2656353 security update for .Net Framework 1.1 was installed. If you uninstall the security update, the error message will go away. You can uninstall it by going into add/remove programs. check
the checkbox "Show Updates" at the top of the window. Scroll down to Microsoft .Net Framework 1.1 and you should see the KB2656353 security update. Uninstall and reboot your machine and you should be good to go.
I posted elsewhere on this site my experience with the MaxHttpCollectionKey fix. Did not work for .Net 1.1 but did when running the same app under .Net 2. Is there a different fix for .Net 1.1?
Member
659 Points
716 Posts
Operation is not valid due to the current state of the object Error
Jan 04, 2012 09:20 AM|Mad-Halfling|LINK
Just an FYI - if you recently (since 29th December 2011) started getting "Operation is not valid due to the current state of the object" errors on complex or involved forms this could wee be the reason why - a recent patch, as far as I can see, it's http://support.microsoft.com/kb/2656351 put a maximum limit on the number of input objects in a form collection to either 500 or 1000 (there seems to be some debate on this), this can be increased by adding a web.config key
- see also http://stackoverflow.com/questions/8684049/asp-net-ms11-100-how-can-i-change-the-limit-on-the-maximum-number-of-posted-for (where I found the solution)
None
0 Points
2 Posts
Re: Operation is not valid due to the current state of the object Error
Jan 04, 2012 12:16 PM|pm3000|LINK
Hi, we are getting same error.
It works in VS 2008,
but not in IE.
It has been working for last 4 months, but last week it stopped.
We added the Web Key above; still not working.
The report has 8 parameter choices and is a matrix style. No subreports. Any ideas?
Member
659 Points
716 Posts
Re: Operation is not valid due to the current state of the object Error
Jan 05, 2012 08:17 AM|Mad-Halfling|LINK
How many input controls does your HTML form have?
None
0 Points
2 Posts
Re: Operation is not valid due to the current state of the object Error
Jan 05, 2012 10:36 AM|pm3000|LINK
I am not sure what an Input Control is. I am using VS to write SRS reports and deploy them to the Microsoft Reporting Services report manager.
We have 8 parameters that the user chooses from to run the report.
Member
659 Points
716 Posts
Re: Operation is not valid due to the current state of the object Error
Jan 05, 2012 10:54 AM|Mad-Halfling|LINK
It doesn't sound like this update is actually affecting you, it may be another update that was recently released. View the HTML code that is produced, and that when you submit the form generates this error - then count the number of <input ..... /> and <select>...</select> elements that are in between the (or each, if there are more than one) <form>...</form> tags. If there are a lot of these (over 500 or 1000) then this is probably your problem, but I suspect (also, due to what you are saying the nature of the form is) that this form will only have 8-10 of such elements - if this is the case then this update probably isn't causing your problem.
Member
50 Points
33 Posts
Re: Operation is not valid due to the current state of the object Error
Jan 12, 2012 05:11 PM|wudwork|LINK
Try setting value of MaxHttpCollectionKeys to 5000 and TEST.
None
0 Points
1 Post
Re: Operation is not valid due to the current state of the object Error
Jan 13, 2012 05:49 PM|mitchells|LINK
I am using VS to write SRS reports also for deploying Microsoft Reporting Services. After removing the latest security updates the SRS reports worked without getting the error "Operation is not valid due to the current state of the object". Is there a way to do the security updates and not get this error on the SRS report?
Member
50 Points
33 Posts
Re: Operation is not valid due to the current state of the object Error
Jan 13, 2012 06:45 PM|wudwork|LINK
I cannot directly answer but I want to offere you a starting point. The error I had was evidenced when I was doing async postback with a large datatable on page. I suspect you have same scenario. You need some way to allow more rows to return to calling page. The above change to web.config does just this as the MS update reduces the # of rows? permitted. Good luck, Tom
None
0 Points
1 Post
Re: Operation is not valid due to the current state of the object Error
Jan 26, 2012 10:57 AM|person147|LINK
I kept getting this error ever since the KB2656353 security update for .Net Framework 1.1 was installed. If you uninstall the security update, the error message will go away. You can uninstall it by going into add/remove programs. check the checkbox "Show Updates" at the top of the window. Scroll down to Microsoft .Net Framework 1.1 and you should see the KB2656353 security update. Uninstall and reboot your machine and you should be good to go.
None
0 Points
3 Posts
Re: Operation is not valid due to the current state of the object Error
Jan 26, 2012 04:59 PM|johnwm|LINK
I posted elsewhere on this site my experience with the MaxHttpCollectionKey fix. Did not work for .Net 1.1 but did when running the same app under .Net 2. Is there a different fix for .Net 1.1?
Member
10 Points
14 Posts
Re: Operation is not valid due to the current state of the object Error
Feb 20, 2012 06:32 AM|heera.chand|LINK
For .Net 1.1 , you have to manually uninstall all security updated that is being install after dec 11.
for that in control panel you have to go to add or remove program in that check show update checkbox. and unistall all update done after dec11.
also turn off automatic update.
even though it is not solved than you have to format your server than 100 percent problem will solved.
but remeber to off automatic update.
if you want to know in more detail why this error occur that go though below link
http://go281.wordpress.com/tag/maxhttpcollectionkeys/
None
0 Points
20 Posts
Re: Operation is not valid due to the current state of the object Error
Feb 22, 2012 11:49 PM|Oscar Gomez|LINK
Hi,
It worked for me, Thanks.
______________________
Oscar Gómez
Engineer at PSL
http://www.pslcorp.com/