none
The DataSourceID of 'TopNavigationMenu' must be the ID of a control of type IHierarchicalDataSource.

    Question

  • I'm getting this error and I haven't a clue as to what I did....

     

    Server Error in '/' Application.

    The DataSourceID of 'TopNavigationMenu' must be the ID of a control of type IHierarchicalDataSource.  A control with ID 'topSiteMap' could not be found.

    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.Web.HttpException: The DataSourceID of 'TopNavigationMenu' must be the ID of a control of type IHierarchicalDataSource.  A control with ID 'topSiteMap' could not be found.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [HttpException (0x80004005): The DataSourceID of 'TopNavigationMenu' must be the ID of a control of type IHierarchicalDataSource.  A control with ID 'topSiteMap' could not be found.]
       System.Web.UI.WebControls.HierarchicalDataBoundControl.GetDataSource() +1415249
       System.Web.UI.WebControls.HierarchicalDataBoundControl.ConnectToHierarchicalDataSource() +158
       System.Web.UI.WebControls.HierarchicalDataBoundControl.OnLoad(EventArgs e) +16
       System.Web.UI.Control.LoadRecursive() +47
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

    Tuesday, July 10, 2007 1:59 PM

Answers

  • I figured it out, I accidentally added a single character and broke my web.config in the sitemapprovider section
    Tuesday, July 10, 2007 3:48 PM

All replies

  • I figured it out, I accidentally added a single character and broke my web.config in the sitemapprovider section
    Tuesday, July 10, 2007 3:48 PM
  • I got this message too.  Here's what I was doing to make it happen.  I did a backup of a WSS3 site to a file using stsadm.  I copied that file to a virtual server running MOSS 2007 and did a restore using stsadm, so I could play with the current site (which management won't pay for the full version, yet) in MOSS and development.

     

    Everything was working fine, and I installed everything just fine.  What caused this error for me was that I enabled the enterprise features on the site, and was turning on various site collection features.  When I turned on the Enterprise Publishing Infrastructure, it came back with that error (after I turned on callstack on the safemode tag in web.config).  Now my site is hosed, and I don't know what to do, but restore the site from the backup again.

     

    The good thing is that at least this is in development.  I hope that this doesn't happen if I ever get MOSS on the production server...

     

    The DataSourceID of 'TopNavigationMenu' must be the ID of a control of type IHierarchicalDataSource.  A control with ID 'topSiteMap' could not be found.   at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetDataSource()
       at System.Web.UI.WebControls.HierarchicalDataBoundControl.ConnectToHierarchicalDataSource()
       at System.Web.UI.WebControls.HierarchicalDataBoundControl.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    on _layouts/ManageFeatures.aspx.

     

    I'm going to try playing with the web.config in that the area mentioned.  Let's hope it works.

     

    Friday, August 10, 2007 4:05 PM
  • Let this be a lesson to anyone who migrates from WSS3 to MOSS. 

     

    Do NOT simply copy the WSS3 web.config to the MOSS server and expect all the MOSS features to work.  I had done this, and it messed things up.  I had modified the WSS web.config, so I just copied it.  That was the big problem.

     

    In order to resolve this problem, I had to create a new web application, and merge the MOSS parts of that new app's web.config to the one I copied from the WSS3 install.  And like magic, everything works!

    Wednesday, August 15, 2007 9:54 PM
  • i see this today, the lesson learned is that i should reivew the uls log first http://archive.msdn.microsoft.com/ULSViewer/Release/ProjectReleases.aspx?ReleaseId=3308 . http://blogs.msdn.com/b/opal/archive/2009/12/22/uls-viewer-for-sharepoint-2010-troubleshooting.aspx .

    first, i found the same entry in uls log view, then going upwards, i can find something like follows:

    DelegateControl: Exception thrown while building custom control 'Microsoft.SharePoint.SPControlElement': Microsoft.SharePoint.WebPartPages.WebPartPageUserException: This page has encountered a critical error. Contact your system administrator if this problem persists.   
     at Microsoft.SharePoint.ApplicationRuntime.SafeControls.IsSafeControl(Boolean isAppWeb, Type type, String& unsafeErrorMessage)   
     at Microsoft.SharePoint.Utilities.SPUtility.CreateServerControlFromAssembly(String sControlAssembly, String sControlClass)   
     at Microsoft.SharePoint.SPControlElement.BuildCustomControl(TemplateControl tctlPage, String sControlAssembly, String sControlClass, String sControlSrc, XmlNode xnElementDefinition, SPFeatureDefinition featdefElement, String sElementId)   
     at Microsoft.SharePoint.WebControls.DelegateControl.BuildCustomControlResilient(SPControlElement ctlelemDefinition)

    The top of callstack suggest me there is something wrong with safe control setting. By comparing the web.config with backup, it seems two safe control entries was added by a custom solution. While the page opens after removing the safe control entry, i really cannot believe this can be the root cause, because i only know that missing safe control entry can cause error, i had never fixed error by removing safe control entry before.

          <SafeControl Assembly="SharePointProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c221e46652bbe5bb" Namespace="SharePointProject.VisualWebPart" TypeName="*" Safe="True" />
          <SafeControl Assembly="SharePointProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c221e46652bbe5bb" Namespace="SharePointProject.ListVisualWebPart" TypeName="*" Safe="True" />

    Tuesday, October 29, 2013 6:49 AM
    Moderator
  • Same exception occurred in one of my organization's production SharePoint server and after simply recycling the app pool that host the web application and restarting the site from IIS Manager, I got this issue resolved.

    Only that web application and site must be recycled or restarted in which above exception is occurring.
    Tuesday, April 01, 2014 10:51 AM