Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can cause Web.sitemap to not be found?

Tags:

asp.net

I have a asp:menu object which I set up to use a SiteMapDataSource but everytime I try to run the site, I get a yellow screen from firefox saying it cannot find the web.sitemap. Here's the code for the sitemapdatasource and the menu. The Web.sitemap file is sitting in the root directory of the website.

<div>
     <asp:Menu ID="MainMenu" CssClass="wTheme" Orientation="Horizontal" runat="server" DataSourceID="SiteMapDataSource1">
     </asp:Menu>
     <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="Web.sitemap" />
</div>

And this is the Web.sitemap looks like so:

<?xml version="1.0" encoding="utf-8" ?>

like image 781
Matt R Avatar asked Dec 28 '25 05:12

Matt R


1 Answers

I had a similar problem where I was specifying the path to the SiteMap from within my DataSource control. I tried removing it and it worked.

Try removing the path from the SiteMapDataSource and ensure that web.sitemap is in the root directory and see if that fixes it.

like image 74
Encoder Avatar answered Dec 30 '25 19:12

Encoder