Background
I have inherited an ASP.NET web application project that has been passed on for the last 6-7 years. The site is running on .NET 2.0 and IIS 7.5 on my development machine and IIS 6.0 on the production server. A further snag to this is that I can not change or refactor the page into smaller fragments. The usual office politics apply, client will not pay for it, no time to do it, resources stretched as is..
Problem
There is one page that has an ASP:Table server control that literally generates hundreds on textboxes.
I have noticed that when it reaches a certain amount of rows that an IIS exception is thrown:
Local Development Machine (IIS 7.5, .NET 2.0)
HTTP Error 400.0 - Bad Request
ASP.NET detected invalid characters in the URL. ..ErrorPage.aspx?ErrorMsg=The+URL-encoded+form+data+is+not+valid.
Production (IIS 6.0, .NET 2.0)
Operation is not valid due to the current state of the object
I have searched around for a couple of hours and I have come across a couple of threads e.g. Operation is not valid due to the current state of the object. when i select dropdown list
I have tried inserting the following AppSettings (shown below) in my Web.config
and cannot get this issue resolved:
<add key="aspnet:MaxHttpCollectionKeys" value="2000" />
<add key="aspnet:MaxJsonDeserializerMembers" value="2000" />
Does anyone have any ideas what I can do to fix this issue or get the above settings to take affect?
Thanks in advance.