Please help me to fix the following error:
Using: Microsoft Visual Studio Ultimate 2012, UI for ASP.NET AJAX Q1 2015
Server Error in '/SmartTrace' Application.Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.
Source Error:
Line 47: for (int i = 0; i < states.Length; i++)
Line 48: {
Line 49: DockState state = DockState.Deserialize(states[i]);
Line 50: e.Positions[state.UniqueName] = state.DockZoneID;
Line 51: e.Indices[state.UniqueName] = state.Index;
Source File: d:\Projects\SmartTrace\Dashboard3.aspx.cs Line: 49
Server Error in '/SmartTrace' Application.Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.
Source Error:
Line 47: for (int i = 0; i < states.Length; i++)
Line 48: {
Line 49: DockState state = DockState.Deserialize(states[i]);
Line 50: e.Positions[state.UniqueName] = state.DockZoneID;
Line 51: e.Indices[state.UniqueName] = state.Index;
Source File: d:\Projects\SmartTrace\Dashboard3.aspx.cs Line: 49
:
Server Error in '/Website1' Application.Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.Source Error: Line 47: for (int i = 0; i < states.Length; i++)Line 48: {Line 49: DockState state = DockState.Deserialize(states[i]);Line 50: e.Positions[state.UniqueName] = state.DockZoneID;Line 51: e.Indices[state.UniqueName] = state.Index;Source File: d:\Projects\SmartTrace\Dashboard3.aspx.cs Line: 49
ASPX Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Dashboard3.aspx.cs" Inherits="Dashboard3" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> </head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> <div> <telerik:RadDockLayout ID="RadDockLayout1" runat="server" OnSaveDockLayout="RadDockLayout1_SaveDockLayout" OnLoadDockLayout="RadDockLayout1_LoadDockLayout" EnableViewState="False" StoreLayoutInViewState="True"> <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"> <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Title="Dock 1" > <ContentTemplate> content 1 </ContentTemplate> </telerik:RadDock> <telerik:RadDock ID="RadDock2" runat="server" Width="300px" Title="Dock 2" > <ContentTemplate> content 2 </ContentTemplate> </telerik:RadDock> </telerik:RadDockZone> </telerik:RadDockLayout> </div> </form></body></html>
C# Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
public partial class Dashboard3 : System.Web.UI.Page
{
protected void Page_Init(object sender, EventArgs e)
{
//RadDockLayout1.Controls.Add(RadDockZone1);
//RadDockLayout1.Controls.Add(RadDockZone2);
//RadDockLayout1.Controls.Add(RadDockZone3);
//RadDockLayout1.Controls.Add(RadDock1);
//RadDockLayout1.Controls.Add(RadDock2);
//RadDockLayout1.Controls.Add(RadDock3);
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void RadDockLayout1_SaveDockLayout(object sender, Telerik.Web.UI.DockLayoutEventArgs e)
{
HttpCookie dockState = Page.Response.Cookies.Get("DashboardDockStates");
if (dockState == null)
{
dockState = new HttpCookie("DashboardDockStates");
Page.Response.Cookies.Add(dockState);
}
List<DockState> stateList = ((RadDockLayout)sender).GetRegisteredDocksState();
StringBuilder serializedList = new StringBuilder();
for (int i = 0; i < stateList.Count; i++)
{
serializedList.Append(stateList[i].ToString());
serializedList.Append("|");
}
dockState.Expires = DateTime.Today.AddMonths(1);
dockState.Value = serializedList.ToString();
}
protected void RadDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e)
{
HttpCookie dockState = Page.Request.Cookies.Get("DashboardDockStates");
if (dockState != null)
{
string serializedList = dockState.Value;
if (serializedList != null)
{
string[] states = serializedList.Split('|');
for (int i = 0; i < states.Length; i++)
{
DockState state = DockState.Deserialize(states[i]);
e.Positions[state.UniqueName] = state.DockZoneID;
e.Indices[state.UniqueName] = state.Index;
}
}
}
}
}