+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / SiteMap does not contain a definition for RootNode

SiteMap does not contain a definition for RootNode

3 posts, 0 answered
  1. Phil C
    Phil C avatar
    28 posts
    Registered:
    06 Sep 2012
    24 Apr 2008
    Link to this post
    Hi, everytime I change a few pages, modify a MasterPage (even if it's not the one acting as Template for the page), I then have an error when adding a SiteMenu, TabStrip or Treeview:

    'SiteMap' does not contain a definition for 'RootNode'

    Oddly, it's fine when adding a Panelbar or Breadcrumb. This must surely be a common problem, and its a showstopper. Can't see much in the DB and the fact PanelBar/Breadcrumb works ok indicates the sitemap must be fine - although I think that is only in SiteFinity, not in actual physical XML file so cannot see inside it. Hope you can help. Phil.
  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    25 Apr 2008
    Link to this post
    Hello Phil,

    This is a very strange exception, since the standard ASP.NET class System.Web.SiteMap contains a property RootNode, you can see it in the .NET Framework API.
    You said that it throws the error only in SiteMenu, SiteTabStrip and SiteTreeview user controls. We investigated those controls and found that SiteMap.RootNode is called directly in there code-behind files. So, is it possible that you have a class named SiteMap somewhere in your Web Site (i.e. in the ~/App_Code), and in the mentioned user controls your SiteMap class is called instead of the standard System.Web.SiteMap? Please check this out.

    If the above is not the problem, please send us your project and we will investigate it for you.

    Regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Phil C
    Phil C avatar
    28 posts
    Registered:
    06 Sep 2012
    25 Apr 2008
    Link to this post
    Thanks Vlad. Doh, you are right! Checked and I had another treeview in a different MasterPage which calls a class I foolishly named SiteMap years ago, not knowing the API too much.

    I've never had this prob before because that Class and whole site runs fine, also odd that this error occurs when I add to one of your default template pages that has nothing to do with my treeview, however as you note, the system.web.sitemap must kick in and then fail.

    Many thanks for your detailed response, you hit it right on the button. I can love SiteFinity again!!

    Phil
Register for webinar
3 posts, 0 answered