This is a migrated thread and some comments may be shown as answers.

Unhandled exception in event viewer

1 Answer 111 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Sameer
Top achievements
Rank 1
Sameer asked on 01 Aug 2012, 07:37 PM
Hello,

We are using ASP.NET 4.1 with Telerik RadControls. In one of the pages, we are using dynamically created RadDock controls. In the designer mode, we allow users to create different controls (textbox, checkbox, radio button lists, etc) and encapsulate them in a RadDock control. This allows them move and resize the controls contained in raddocks and then we save their dockstate in the SQL Server 2008 database. In the view mode, all the controls are re-created dynamically along with raddocks and added to an AjaxPanel on the page for display. In this mode, they can't be moved or resized, and are used for data entry only.

The application does work fine, but we have been noticing these unhandled exceptions in the IIS event log related to this page -
Exception information:

    Exception type: ArgumentException

    Exception message: Unterminated string passed in. (80): {"Top":1214,"Left":271,"DockZoneID":"","Collapsed":false,"Pinned":false,"Resizab
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeString()
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeMemberName()
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(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 Telerik.Web.UI.RadWebControl.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)

Request information:
    Request URL: http://fhcehrmedical/Modules/------   
Request path: /Modules/Template/-------
    User host address: -----------------
    User: ----------
    Is authenticated: True
    Authentication Type: Forms
    Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
    Thread ID: 21
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False

    Stack trace:    at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeString()
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeMemberName()
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(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 Telerik.Web.UI.RadWebControl.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)

This is not a consistent occurrence throughout the board but we do get about 15-20 of them every day. There are no Ajax calls from within this page itself; all it does is a regular save and retrieval. Also, this error is not logged every time they save it, but some times which is what making it difficult for us to track it down. We have investigated the individual controls that seem to cause this problem and their dockstate in the database is no different from the rest of the controls.

Can someone please provide an insight as to what could be causing this issue?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 06 Aug 2012, 01:47 PM
Hello Sameer,

It appears that the string, containing the RadDocks state, is not formatted correctly, which results in the encountered exception when your try to deserialize it. I will need to examine your implementation of the saving and loading of the RadDock state in order to be able to provide further assistance. Please try isolating it in a simple, fully runnable project that will allow me to inspect it locally.

You can also try recording the RadDock state when the error occurs so that the exact string can be examined for problems.

Regards,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Dock
Asked by
Sameer
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or