I am getting an error on every page wherever i have used rad controls.In fact my project has completely stopped working due to these errors:
Before it was working fine. The error is:
​Sys.WebForms.PageRequestManagerServerErrorException:
Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON
primitive:
{"enabled":true,"emptyMessage":"","validationText":"","valueAsString":"","minValue":0,"maxValue":70368744177664,"lastSetTextBoxValue":""}.
Please tell me the solution for this so that i can fix it and work on my project asap
8 Answers, 1 is accepted
In order for us to pinpoint the reason for the error we would need some additional information. Would you elaborate more on your scenario? Do you have Ajax enabled on the page? If yes - would you disable the Ajax and check if the error will persist.
Additionally if there is an AjaxToolkit script manager on the page try replacing it with RadAjaxScriptManager and see if it makes a difference.
If the error persists I would ask you to share your full markup with the code-behind so we could try to replicate the issue locally. This would allow us to better understand your scenario and provide an appropriate solution.
Regards,
Viktor Tachev
Telerik
Here is Exception...
Invalid JSON primitive: {"enabled":true,"emptyMessage":"","validationText":"xxx","valueAsString":"xxx","lastSetTextBoxValue":"xxx"}.
Stack Trace:
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 System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input)
at Telerik.Web.UI.RadInputControl.LoadPostData(String postDataKey, NameValueCollection postCollection)
at Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I have ajaxtoolkit in my page and I am asp ScriptmanagerProxy and also ajaxified the page using update panels.
So Please help me in finding the solution...
My colleague has answered your query in the support ticket you have posted. Please try to follow the suggestions provided there and you should be able to achieve the behavior you are looking for.
Regards,
Viktor Tachev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
In the specific scenario for Varun the issue was caused by specific RadAjaxManager settings. A RadDock control was added to the UpdatedControls collection. If you have similar scenario you can try one of the following approaches.
- wrap RadDock in a Panel control and add the Panel to the UpdatedControls collection
- place RadDock in a RadDockZone
However, the issue could be caused by various reasons. It would be hard to pinpoint what is the cause in your scenario without investigating the matter further. Would you share your markup code with rhe relevant code behind? This will enable us to examine it and look for a possible cause.
Additionally, try to disable AJAX by setting the EnableAjax property of RadAjaxManager to false. Check if there is a server-side error thrown after this.
Regards,
Viktor Tachev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Hi,
I am getting lot of on almost every page wherever i have used rad controls.
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject()
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 Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Can someone please take a look and provide the solution.
Regards,
Jaspal Singh
Hi Viktor,
Thanks for the answer, it solved my issue. But I am facing a new problem, after following your suggestion. Now RadDock state is not working. I am storing RadDock state in session and on page refreshing, I am unable to see state stored RadDock.
Please suggest a solution
Upgraded to 2023 1.323.45 trial license. While I wait for Purchasing department to buy a license.. I'm tasked with getting the security vulnerability closed up. During the upgrade.. having multiple issues... Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive
This error happens all over the place. Please advise.
I have already answered your Support ticket opened for this issue, but I will share the answer here as well.
This error message is known to appear when creating controls dynamically and the client-side objects are malformed or when the request/response does not contain a valid JSON string.Could you please share the Page (ASPX + ASPX.CS) so we can see how things are created?