iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Gentlemen,
I have run into a serious problem in my webscheduler. When loading the webscheduler in my application I am receiving a "Json_MaxJsonLengthExceeded". See attached screen shot image. Additional information as follows:
1). The Json error ONLY occurs when my events records EXCEED 2450 records (approximate).
2). I have tried changing my webconfig setting <jsonSerialization maxJsonLength="524288" />
to <jsonSerialization maxJsonLength="2147483647" /> to no avail
3). I am using SQL Server Enterprise 2008 X64 with Windows 7 Ultimate on IIS7.5
4). My webscheduler is version 3.x
5). In my webscheduler properties, I have changed my General > EnableFastJsonSerialization setting from True to False. When I do this the webscheduler does not load any data, or if it does eventually load it takes longer than 5 minutes as I have not let it try to load for longer than 5 minutes before closing the page.
My application can and will have over 100,000 records in the events table within the first year. Will the webscheduler be robust enough to handle this?
Please advise as to how to resolve this Json error.
Thanks - Frank
... My application can and will have over 100,000 records in the events table within the first year. Will the webscheduler be robust enough to handle this?...
Yes, the WebScheduler will robust enough to handle this. Please ensure that you have enable the EnableFastJsonSerialization property and manually set the MaxJsonLength property of WebScheduler in web.config as shown in the following snippet code.
<add key="ISNet.WebUI.WebScheduler.v3_0_1000.MaxJsonLength" value="number"/>
Hope this helps.
Hi Yudi,
Thank you for your reply. Unfortunately your suggestions did not work and I am still getting the error.
One question: is the value="number" supposed to be a number? I tried it several ways including value="number", value="524288" and value="999999999" to no avail. I also have another json reference in my webconfig as follows:
<system.web.extensions> <scripting> <webServices> <authenticationService enabled="true" /> <jsonSerialization maxJsonLength="524288" /> </webServices> </scripting> </system.web.extensions>
However I tried your snippet with and without the other json reference and no success.
I am also assuming your snippet should be placed in the same add key reference section as the other intersoft references?
Please advise and thanks - Frank
...One question: is the value="number" supposed to be a number? I tried it several ways including value="number", value="524288" and value="999999999" to no avail...
Yes, you are correct. The value=”number” is supposed to be a number (as illustrated in the following snippet code).
<configuration> <appSettings> ... <add key="ISNet.WebUI.WebScheduler.v3_0_1000.MaxJsonLength" value="2147483647"/> ... </appSettings> </configuration>
WebScheduler has its own maximum length for JSON strings. The default value is 5 MB. It is recommended to remove the other JSON reference in your web.config file and use the WebScheduler’s MaxJsonLength declaration as shown in the above snippet code. Please note that you need to enable the EnableFastJsonSerialization property.
Look forward to hearing back from you.
Yudi,
Thank you for your continued assistance in helping me resolve this issue. I have been unavailable the past several days to continue troubleshooting.
I will however try your suggestions within the next 1-2 days and reply back in this thread with further information.
Thanks again -
Frank
I believe I have resolved the problem.
I changed the LoadOnDemandMode from TripleLoad to SingleLoad and the problem appears to be resolved. Whether the json reference is included or not in the webconfig file, setting to SingleLoad resolves the problem.
However, I am now wondering if there will be a future or long term performance "hit" due to the setting change?
Also, the answers to your above posted questions are as follows:
1). The mode does not seem to matter, setting for timeline, day, month etc. invokes the json error in tripleload, however my default view is timeline.
2). Client and server paging are both set to True, setting them to False did not make a difference in TripleLoad.
3). Did not troubleshoot with HttpWatch.
4). There are no recurring events in my application, the tables are empty.
Please advise and thanks!
The Triple-load mode will pre-load the next and previous data along with the current data. With this approach user can see the data directly when they go to previous data and/or next data.
Unlike the Triple-load mode, the Single-load mode will only load the current data, this will reduce the traffic for first time load, but when user navigate to previous data and / or next data, they will need to wait for the data to be loaded prior the rendering process.
Your decision to change the LoadOnDemandMode into SingleLoad is correct. There will be no performance problem in the future. Should you find any, please feel free to let us know, we’ll be glad to assist you again.
This problem has arisen again and my application is now broken in a mission critical client production environment. The webscheduler3 is set for single load. The strange thing is the users can view the current day or any day in the future, but when they click an any day in the past the maxjson error occurs and freezes the control. The view that is being used by default is the timelineview.
In the webconfig the maxjson length is set for 2147483647
Is there any way I can pay for right now technical support? As I said my client application is down!
Please help!!!
In the following, I will describe the step-by-step to analyze and solve problem that occur in WebScheduler especially dealing with the “MaxJsonLengthExceeded” problem.
WebScheduler has its own maximum length for JSON strings. The default value is 5000000 byte (5 MB approx.). It is recommended to remove the other JSON reference in your web.config file and use the WebScheduler’s MaxJsonLength declaration as shown in the following snippet code.
<configuration> <appSettings> ... <add key="ISNet.WebUI.WebScheduler.v3_0_1000.MaxJsonLength" value="5000"/> ... </appSettings> ... </configuration>
Please note that you need to enable the EnableFastJsonSerialization property of WebScheduler.
First, let’s modify the value of MaxJsonLength property of WebScheduler to a smaller number so that we can reproduce the reported problem.
Next, I’ll show you what may cause the problem.
<configuration> <appSettings> ... <!--<add key="ISNet.WebUI.WebScheduler.v3_0_1000.MaxJsonLength" value="5000"/>--> ... </appSettings> ... </configuration>
It is obvious that when we set the value of MaxJsonLength to a certain number which is sufficient for the Json response, the problem is no longer persist.
Please try to do the same and let us know whether this helps or not.
Thank you for your reply. We performed all the above analysis prior to my post, and again after your recent reply.
You stated >
"It is obvious that when we set the value of MaxJsonLength to a certain number which is sufficient for the Json response, the problem is no longer persist. WebScheduler has its own maximum length for JSON strings. The default value is 5000000 byte (5 MB approx.).
Our analysis indicates that is the problem! Our queries are passing more than 5mb! If we set the maxjsonvalue to the max value of 2147483647 we are able to see more data records on the control, but still receive the error when clicking different calender days at random. I am assuming the control is limited to jason value of 5000000 bytes, (probably in a dll?), and this seems to be the underlying issue.
Please advise and thanks -
Have you tried to enable Client Paging and Server Paging of WebScheduler?
Client paging can be enabled in Day, Week, Timeline, and Split view. In Month view, it is enabled by default, since the layout structure requires it to be implemented when large data is used. The snippet code below shows how to enable client paging in Day view.
<DayView EnableClientPaging="true" AllDayEventPageSize="10" EventBlockSize="5" />
It is also suggested to utilize server paging in Timeline view mode. With server paging, WebScheduler downloads only a small chunk of data based on the viewport during initial load and intelligently request more data as user scrolls downward. Please note that Server paging feature is only applicable when the client paging is set to ViewPort or Both. The code below shows how to enable server paging in Timeline view.
<TimelineView Enabled="True" EnableClientPaging="true" ClientPagingMode="Both" EnableServerPaging="true" />
Please kindly check the code in HighPerformanceScheduler.aspx sample file for more detail information.
If the problem still persists, could you please send us a working simple sample which replicates the problem? You may also edit one of WebScheduler’s sample file or add more events into it. Please send the sample file so that we can assist you further.
Thank you for your continued assistance, it is greatly appreciated. Here is what we have analyzed;
1). Client and server paging have always been set for true
2). Tried clientpagingmode set for Both and ViewPort
3). Tried just about every other setting we could conceive of the past 3 full days.
4). We also noticed some of the the other views, like month view also return the same problem.
5). We are able to select any calendar day in the future and 3 days in the past, but any date selected in the past that is more than 3 days behind the current day returns the json error.
6). We noticed in our analysis that the json call made by the webscheduler seems to be sending the selected calendar date as (- 30 days) in the query and perhaps even loading the whole 30 days of past data which may be overloading the json. For example attached file "Record_09102013_WithError" illustrates a selected date of 09/10/2013 but the query shows .2013.8.10 which throws the json error. Also if we simply click the calender month to go back a month from september to august same json error.
Attached file "Record_09172013_WithoutError" illustrates a selected date of 09/17/13, (todays date), and the query shows .2013.8.17. but the json error is not thrown.
We are not sure what to provide as far as your requested "working sample", please provide specific details. Also, it would be highly beneficial to be able to conduct a webex or teamviewer support session to help us expedite this issue, as stated before our client application is malfunctioning due to the above issues. I am willing to pay for any real time help required to assist us in resolving the issue!
It seems that you forgot to attach the Record_09102013_WithError.png.
Please allow me to explain about the information that I got from Record_09172013_WithoutError.png file.
The WebSchedulerRequest shows that the selectedDate is “2013.8.17”; viewMode is “Timeline”; selectedViewMode is “Timeline”; and selectedTimelineViewMode is “Day15minutes”. Let’s start with the selectedDate part first. It is actually says that the selected date is September 17, 2013 (not August 17, 2013). The month part is started from zero instead of 1. You can try to navigate to January 2013 and the selectedDate will returns 2013.0.1.
The WebSchedulerRequest shows that the data is set to select.2013.8.17. This is the correct data for current view: September 17, 2013. This information aligns with your setting which says that you are using SingleLoad instead of TripleLoad. When you are using TripleLoad, you will get something like following: data="prev.2013.8.16;next.2013.8.18;select.2013.8.17".
The terms “working sample” in my previous post means that I need a working sample which replicates the reported problem since I was unable to reproduce it in my local end. On September 16, 2013 I was able to have the same issue by set the MaxJsonLength property to a smaller number. I’m afraid that this will not help much since you’ve said that set MaxJsonLength to the max value of 2147483647 doesn’t rectify the problem.
Please let us hear your response.
The missing attached file is included below.
Thanks so much for your prompt attention to helping us resolve the issue. I wanted to follow up on this post in case any other developers experience the same issue.
The max json error occurs when too much data is loaded into the control through the dataset query. With your help we were able to add parameters to our queries based on filtering the startdatetime for and only loading data for the date selected on the calendar by the user. We used the sample code provided in the high performance webcheduler sample.
Glad to hear the good news.
We also would like to express our gratitude to Frank and his team for the patience and cooperation.
Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.
We look forward to serving your future needs.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname