Data contract type 'Telerik.Web.UI.RadTreeNodeData' cannot be deserialized

5 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    22 posts
    Member since:
    Oct 2006

    Posted 01 Sep 2009 Link to this post

    Hi,

    I am populating a Rad TreeView manually for the first level and then using a WCF Service when a user expands a node.
    This was all working perfectly until today (1st Sept) when I started recieving the javascript error below.

    The data contract type 'Telerik.Web.UI.RadTreeNodeData' cannot be deserialized
    because the required data members '_attributes, _enabled, _text, _value,
    _contentCssClass, _contextMenuID, _cssClass, _disabledCssClass, _disabledImageUrl,
    _expandMode, _expandedImageUrl, _hoveredCssClass, _hoveredImageUrl, _imageUrl,
     _navigateUrl, _postBack, _selectedCssClass' were not found. 

    Example post data:

    {"node":{"Text":"XYZ","Value":null,"ExpandMode":3,"NavigateUrl":"/Child/XYZ75/","PostBack":true,"DisabledCssClass":null,"SelectedCssClass":null,
    "HoveredCssClass":null,"HoveredImageUrl":null,"DisabledImageUrl":null,
    "ExpandedImageUrl":null,"ContextMenuID":"BUCtxMenu",
    "Attributes":[{"Key":"key","Value":"BU-370"},
    {"Key":"A","Value":"False"},{"Key":"SIA","Value":"0"}]},"context":[]} 


    Would anyone be able to suggest what might be causing this?

    Thanks
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 02 Sep 2009 Link to this post

    Hi Jonathan,

    Unfortunately we cannot tell why this error occurs from the provided information. Have you changed anything when this error started to appear? Have you upgraded Telerik.Web.UI.dll to a new version? You could check the WCF configuration in the web.config which might have changed. Additionally please check our online demo and make sure you are using the same approach. If none of this helps it would be best to open a support ticket and send us a sample web site which reproduces this error.


    Regards,
    Atanas Korchev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Jonathan
    Jonathan avatar
    22 posts
    Member since:
    Oct 2006

    Posted 02 Sep 2009 Link to this post

    I dont believe anything has changed in the project. The treeview implementation is setup as per the Telerik example.

    After investigating further it seems to be something that is just affecting the current web application. If I extract the parts required for the treeview to work into a brand new project, it works perfectly.

    Sadly the main project is far to large to move everything into a brand new solution and also the issue may just arise again.

    I am at a loss as to what might be 'interfering' with the wcf call.
    I have been through the web.config disabling httpmodules, handlers and anything else possible, but nothing seems to make any difference.




  4. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 03 Sep 2009 Link to this post

    Hi Jonathan,

    Frankly I don't think this error is caused by some http module or handler. This sounds like some sort of WCF configuration problem. Unfortunately I have not seen this exact error message before and I cannot give any instructions how to troubleshoot that problem. I may suggest you create a new Ajax enabled WCF service from scratch and see if it works with the new one. If you manage to isolate the problem in your main project please send it over in a support ticket.

    Regards,
    Atanas Korchev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Jonathan
    Jonathan avatar
    22 posts
    Member since:
    Oct 2006

    Posted 10 Sep 2009 Link to this post

    I have solved the problem, although I am not sure what the actual cause was...

    I had a javascript prototype method (that removed items from an array) included in the page that was rendering the treeview
    When I removed the method, the treeview worked again....
Back to Top