I have an ASP.Net 4.0 application in which contains a web form containing a ScriptManager, UpdatePanel and some controls, including a WebDropDown. This form has been in production for some time now with no issues. The app is using 2010.3
I recently tried to add another field to the form (textbox), and after compiling and executing the code on my VS2010 PC when I attempt to post the page back I started getting this error:
"Microsoft.JScript" runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed."
I have tried removing my changes to the page, but the error still comes up. I even pulled from the production server the same web form in production (aspx, cs and designer files) and replaced the existing files of my project, but I still get the same error.
Testing other web forms in my application using AJAX, they work fine, so I assumed it must be a problem with the specific form.
So I stripped down my page and left only the WebDropDown and the button causing the postback and tested. The problem occurs with the WebDropDown and goes away without it. I went one step further and left the WebDropDown with no data, and the problem did not occur. Loading some dummy data manually in the code behind (as opposed to data from the db) also results in the problem not happening. So my next assumption was that this is a data related issue (hence why the problem did not happen in production).
To test my theory I downloaded the prod database and used it on my machine; the problem occured, so my theory is wrong.
I am running out of ideas, so please if you have ever encountered such an issue I would appreciate some help.
After many hours of tests I have arrived to the conclusion that the error has to do with the number of records loaded on the WebDropDown; by limiting my stored procedure to the top 999 records, the application is fine. Upon selecting the top 1000 records the error is thrown.
If anyone knows of a setting in the control which might explain this bahavior, please let me know as soon as possible.
thanks
Hello Chris,I have made a sample based on the information you have provided via NetAdvantage 11.2.20112.2025 which is the latest service release for the moment and tested it under IE 9. The sample contains WDD populated on code behind and a button causing postback. The issue is not reproducible via table with 900 or 1900 records. Please modify the sample or create a new one which reproduces the missbehavuior you are facing.
Hello Chris,I couldnt make a running sample from the archived files you sent me due to missing :
using
TestWebDropDown.DataSet1TableAdapters;causing DataSet1TableAdapters to be unavailable. Please attach modified runnable sample which reproduces the behavior. Also if possible please test with latest service release for your version of NetAdvantage. As you mentioned that you have tested the code under different machines please provide under what environment the issue is reproducing. Is it sp[ecific to a browser or specific to a OS version (32/64 bit). I will have to reproduce the same behavior on my side and debug to see if the error is in our controls or wrong implementation from your side but currently i am unable due to missing custom files.
Hi Nikifor
This is the sample with no DataSet; it instead is using a dummy algorithm counting upwards and adding the items to the webdropdown. Just create a new project, and add the form files and run. You can try having more than 1000 items for the error to appear.
The version used is 10.3 version 2120 with the Service Release applied. The platform is W7 Professional, VS2010 Professional.
Please note that after I copied the sources and dll on the prod machine, it has been working fine. The problem only appears on my dev machine.
Let me know if you need anything else.
Hello Chris,Thank you for the provided code. I managed to run the sample based on it and tested the code under FF9, IE 9 and Chrome and none of the browsers. I tested with 999 and 1999 items. Since you have tried your code on your production machine, on another dev machine, I have tried it on my machine (I am with Win 7 Enterprise) and none of them reproduce the issue I assume it is caused by your specific environments and their settings. The best I can do is to suggest we schedule a LogMeIn session. Please provide me a time zone and time interval available for you for tomorrow 10 January. If the date is not available for you please pick up a new one.
Thanks; I am at GMT+2 (Athens, Helsinki, etc). Tomorrow I can be available after 16:30 local time.
Will I need to install something on my machine for this session? Will there be a support charge?
FYI I have also re-applied the NA2010.3 SR and VS2010 SP1 on my development machine but with no effect. Am I right to understand that VS2010 uses different control library files than the production server? (on the prod server, I just copy the bin directory), whereas on the local machine I think VS references the assemblies from somewhere else. Could it be that the assembly files have become corrupted on my machine? Should I try to re-install NA and re-apply the SR?
Thanks
chris
Hello Chris,There is no need of reinstalling NA. It seems like an issue releted to your environment and its settings rather than corrupted assemblies. I have created a support ticket with number CAS-81141-L5PNBG. I have scheduled a LogMeIn setssion for tomorrow 10 January 16:30 PM GMT+2 (i am same time zone). I will provide you with details for the session through the support ticket i have created 10 minites before the start.
Thank you all for sharing your experience with the community
The app settings fix also worked for a WebTree with > 1000 check box nodes. I was having the the error below.
Error Message: System.InvalidOperationException: Operation is not valid due to the current state of the object. at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeList(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) at Infragistics.Web.UI.Framework.ObjectBase.LoadCollectionsStateFromViewState() at Infragistics.Web.UI.Framework.RunBot.HandleLoadViewState() at Infragistics.Web.UI.Framework.Data.HierarchicalDataBoundControlMain.LoadViewState(Object savedState) at Infragistics.Web.UI.NavigationControls.NavControl.LoadViewState(Object savedState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByID(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at Infragistics.Web.UI.LayoutControls.AJAXContentPane.InstantiateTemplate(Boolean ajax, Boolean dynamicUP, String triggerID, Boolean loadContent) at Infragistics.Web.UI.LayoutControls.WebTab.InstantiateTemplates() at Infragistics.Web.UI.LayoutControls.WebTab.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.FindControl(String id, Int32 pathOffset) at System.Web.UI.Control.FindControl(String id, Int32 pathOffset) at System.Web.UI.Page.FindControl(String id) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
FYI -
In our situation, our main processing page - the one with the most controls and data - started erroring out. After much research we found the problem was related to a Microsoft update. Most references suggested changing the "MaxHttpCollectionKeys" in your appSettings. That didn't correct the problem for our web application.
So...with a little more research I also found a reference concerning the "MaxJsonDeserializerMembers". Once we bumped that value up in appSettings, the error was corrected.
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="5000" />
<add key="aspnet:MaxJsonDeserializerMembers" value="5000" />
</appSettings>
This was caused by Microsoft’s upgrade MS11-100 – specifically KB2656351 and KB2661403.
Hope this helps.
Hello everyone,
This issue is introduced by Microsoft with a recent .NET Framework security update from 12/29/2011. The knowledge base article describing the change is located here: http://support.microsoft.com/kb/2661403 . Microsoft are now limiting the size of the JSON keys collection to 1000 items by default and this can be changed via configuration. This means that when a control like the WebDropDown or the WebDataTree has more than 1000 items, an invalid operation exception would be thrown on deserialization of the view state.
Stackoverflow has several articles about this issue: http://stackoverflow.com/questions/8686129/microsoft-hash-dos-security-update-imposes-1000-form-field-limit-breaks-large-f
You can avoid this issue via configuration by changing the MaxJsonDeserializerMembers to a value larger than the default (1000):
<configuration> <appSettings> <add key="aspnet:MaxJsonDeserializerMembers" value="1000" /> </appSettings> </configuration>
My company has a big investment in Infragistics controls. This is a critical problem for my company. We have production applications falling out of the sky. Our IT department will not roll back the patch on any of our servers. We really need this fixed.
This is not an acceptable answer for our company. We are reviewing other 3rd party controls. The resolution of this issue will weigh heavily on our decision to move other controls offered by other 3rd party companies.
Thanks for your help