frenchie_nic
Member
- Joined
- May 3, 2006
- Messages
- 7
- Programming Experience
- Beginner
help please,
i am trying to do a sitemap as follow:
but if i try to run it i get an error message as:
Exactly one <siteMapNode> element is required directly inside the <siteMap> element.
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.Configuration.ConfigurationErrorsException: Exactly one <siteMapNode> element is required directly inside the <siteMap> element.
Stack Trace:
[ConfigurationErrorsException: Exactly one <siteMapNode> element is required directly inside the <siteMap> element.] System.Web.XmlSiteMapProvider.BuildSiteMap() +1369 System.Web.StaticSiteMapProvider.FindSiteMapNode(String rawUrl) +130 System.Web.XmlSiteMapProvider.FindSiteMapNode(String rawUrl) +86 System.Web.SiteMapProvider.FindSiteMapNode(HttpContext context) +106 System.Web.SiteMapProvider.get_CurrentNode() +61 System.Web.SiteMapProvider.GetCurrentNodeAndHintAncestorNodes(Int32 upLevel) +75 System.Web.UI.WebControls.SiteMapPath.CreateControlHierarchy() +91 System.Web.UI.WebControls.SiteMapPath.CreateChildControls() +46 System.Web.UI.Control.EnsureChildControls() +134 System.Web.UI.Control.PreRenderRecursiveInternal() +109 System.Web.UI.Control.PreRenderRecursiveInternal() +233 System.Web.UI.Control.PreRenderRecursiveInternal() +233 System.Web.UI.Control.PreRenderRecursiveInternal() +233 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5846 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +188 System.Web.UI.Page.ProcessRequest() +112 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +37 System.Web.UI.Page.ProcessRequest(HttpContext context) +135 ASP.default_aspx.ProcessRequest(HttpContext context) +30 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +401 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +117
can someone please explain to me y this is happening? even after copying the code from a book i can't put more then one node in my sitemap unless i put the other nodes as a second level (i want to create a menue with all my page on the same level.
thanks
Nic
i am trying to do a sitemap as follow:
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="Home" description="Home" url="~/Default.aspx" />
<siteMapNode title="Contact us" description="Contact us" url="~/ContactUs.aspx" />
</siteMap>
but if i try to run it i get an error message as:
Exactly one <siteMapNode> element is required directly inside the <siteMap> element.
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.Configuration.ConfigurationErrorsException: Exactly one <siteMapNode> element is required directly inside the <siteMap> element.
Stack Trace:
[ConfigurationErrorsException: Exactly one <siteMapNode> element is required directly inside the <siteMap> element.] System.Web.XmlSiteMapProvider.BuildSiteMap() +1369 System.Web.StaticSiteMapProvider.FindSiteMapNode(String rawUrl) +130 System.Web.XmlSiteMapProvider.FindSiteMapNode(String rawUrl) +86 System.Web.SiteMapProvider.FindSiteMapNode(HttpContext context) +106 System.Web.SiteMapProvider.get_CurrentNode() +61 System.Web.SiteMapProvider.GetCurrentNodeAndHintAncestorNodes(Int32 upLevel) +75 System.Web.UI.WebControls.SiteMapPath.CreateControlHierarchy() +91 System.Web.UI.WebControls.SiteMapPath.CreateChildControls() +46 System.Web.UI.Control.EnsureChildControls() +134 System.Web.UI.Control.PreRenderRecursiveInternal() +109 System.Web.UI.Control.PreRenderRecursiveInternal() +233 System.Web.UI.Control.PreRenderRecursiveInternal() +233 System.Web.UI.Control.PreRenderRecursiveInternal() +233 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5846 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +188 System.Web.UI.Page.ProcessRequest() +112 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +37 System.Web.UI.Page.ProcessRequest(HttpContext context) +135 ASP.default_aspx.ProcessRequest(HttpContext context) +30 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +401 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +117
can someone please explain to me y this is happening? even after copying the code from a book i can't put more then one node in my sitemap unless i put the other nodes as a second level (i want to create a menue with all my page on the same level.
thanks
Nic
Last edited by a moderator: