This is a migrated thread and some comments may be shown as answers.
RadPanel & cookie
1 Answer 35 Views
This is a migrated thread and some comments may be shown as answers.
o.courtois
Top achievements
Rank 1
o.courtois asked on 21 May 2008, 02:12 PM
Hello, i would like to upgrade my production site with the last telerik version. But, the Radpanel cookie format has changed.
In a old version, when a user has clicked on a menu item, the cokie looks like this:

{"SelectedItem":"ctl00_LoginView2_Menu1_RadPanelbarMenu_p2_p1_p1","ExpandedItems":"ctl00_LoginView2_Menu1_RadPanelbarMenu_p1,ctl00_LoginView2_Menu1_RadPanelbarMenu_p2,ctl00_LoginView2_Menu1_RadPanelbarMenu_p2_p1,ctl00_LoginView2_Menu1_RadPanelbarMenu_p3,ctl00_LoginView2_Menu1_RadPanelbarMenu_p4"}

in the last version ( 2008.1.515.35 ) the cookie looks like this:

{"SelectedItems":["2:1:1"],"ExpandedItems":["1","2:1","2","3","4"]}

The probleme is, when a user with the old cookie come back to my new site version, i have an exception
<StackTrace>   à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
   à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
   à System.Web.Script.Serialization.ObjectConverter.AssignToPropertyOrField(Object propertyValue, Object o, String memberName, JavaScriptSerializer serializer, Boolean throwOnError)  
   à System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
   à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
   à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
   à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer)  
   à System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)  
   à System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)  
   à Telerik.Web.UI.RadPanelBar.LoadState(String state)  
   à Telerik.Web.UI.RadPanelBar.LoadStateFromCookie()  
   à Telerik.Web.UI.RadPanelBar.OnPreRender(EventArgs e)  
   à System.Web.UI.Control.PreRenderRecursiveInternal()  
   à System.Web.UI.Control.PreRenderRecursiveInternal()  
   à System.Web.UI.Control.PreRenderRecursiveInternal()  
   à System.Web.UI.Control.PreRenderRecursiveInternal()  
   à System.Web.UI.Control.PreRenderRecursiveInternal()  
   à System.Web.UI.Control.PreRenderRecursiveInternal()  
   à System.Web.UI.Control.PreRenderRecursiveInternal()  
   à System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</StackTrace> 

how can i resolve this ?

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 23 May 2008, 02:03 PM
Hi ,

The way cookies are saved was changed during the process of migration of RadPanelBar to Telerik.WEb.UI suite.

Unfortunately there is nothing we can suggest as a workaround for this problem. You can override PreRender event of RadPanelBar use there try -catch-block to prevent showing the error .

We apologize for the inconvenience this causes to you.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Asked by
o.courtois
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or