473,324 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

The file web.sitemap required by XmlSiteMapProvider does not exist.

Hi,

I'm very new to ASP.Net. I made a Site Map, it is as follows:

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  3.    <siteMapNode url="WebPage.aspx" title="Home"  description="">
  4.    <siteMapNode url="Catalog.aspx" title="Our"  description="rewewrre">
  5.         <siteMapNode url="ProductCategory.aspx" title="Products"  description="rerrerewre" />
  6.         <siteMapNode url="Product.aspx" title="View Product"  description="rerrrere" />
  7.   </siteMapNode>
  8.   <siteMapNode url="Cart.aspx" title="Shopping"  description="" />
  9.   <siteMapNode url="Account.aspx" title="My Account"  description="" />
  10.   <siteMapNode url="SignIn.aspx" title="Login"  description="" >
  11.   <siteMapNode url="PassReset.aspx" title="Reset Password"  description="" />
  12.   <siteMapNode url="AccountDetails.aspx" title="Manage Account"  description="" >
  13.     <siteMapNode url="Profile.aspx" title="Acount Information"  description="" />
  14.     <siteMapNode url="OrderHistory.aspx" title="My Orders"  description="" >
  15.       <siteMapNode url="ViewOrder.aspx" title="View Order"  description="" />
  16.     </siteMapNode>
  17.   </siteMapNode>
  18.   </siteMapNode>
  19.     <siteMapNode url="AboutUs.aspx" title="About Us"  description="" />
  20.     <siteMapNode url="Privacy.aspx" title="Privacy Policy"  description="" />
  21.     <siteMapNode url="ContactUs.aspx" title="Contac Us"  description="" />
  22.     <siteMapNode url="MediaKit.aspx" title="Media Relations"  description="" />
  23.   </siteMapNode>
  24.  
  25. </siteMap>
============================
I used a asp.net page "WebPage.aspx" and I try to display the above information through a SiteMapDataSource
and a navigation control (Menu) connect to SiteMapDataSource The source of WebPage.aspx is as follows:
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebPage.aspx.cs" Inherits="chap3__InputValidation_SiteNavigation__Lesson2_Using_the_Site_Map_Web_Server_Control_WebPage" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head runat="server">
  7.     <title></title>
  8. </head>
  9. <body>
  10.     <form id="form1" runat="server">
  11.     <div>
  12.         <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" 
  13.             ShowStartingNode="False" StartingNodeOffset="0" />
  14.             <br />
  15.         <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" 
  16.             Orientation="Horizontal" MaximumDynamicDisplayLevels="5">
  17.         </asp:Menu>
  18.         <br />
  19.         <br />
  20.  
  21.         <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
  22.     </div>
  23.     </form>
  24. </body>
  25. </html>
--------
Mine code-behind is as:

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using System.Collections.Specialized;
  8.  
  9. public partial class chap3__InputValidation_SiteNavigation__Lesson2_Using_the_Site_Map_Web_Server_Control_WebPage : System.Web.UI.Page
  10. {
  11.     protected void Page_Load(object sender, EventArgs e)
  12.     {       
  13.     }
  14.     protected void Button1_Click(object sender, EventArgs e)
  15.     {       Response.Redirect(SiteMap.CurrentNode.ParentNode.Url );
  16.     }
  17. }
  18. +++++
  19.  
When I use "start without debugging" I get the this error:
"The file web.sitemap required by XmlSiteMapProvider does not exist."

please help me to complete this work.

Thanking you in anticipation.

Jalali Bafti
Mar 3 '11 #1
3 6601
Frinavale
9,735 Expert Mod 8TB
Your web.sitemap has to be located in the root of your web application.


-Frinny
Mar 4 '11 #2
Hi...A such problem could happened if you have more than one "web.sitemap",in the website root folder.
Mar 11 '11 #3
Thanks Frinavale for the clarification ..
Mar 12 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: schwerdy | last post by:
Hello developers! I'm using Python 2.3.4 under debian Sarge and want to write a small logger class. My source code reads: #*************************************************** import sys, time...
20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
1
by: Mike Blackett | last post by:
Hi all, I have several folders of images. Inside each folder is a JS file defining an array of the images with a description of each image. When a user selects a 'gallery'/folder on my site,...
0
by: Serdge Kooleman | last post by:
C# 2005 how to remove warning "The file 'C:\Main.cs' does not support code parsing or generation because it is not contained within a project that supports code. i created the web project...
2
by: ptkumar | last post by:
Hi everybody, I am generating pdf file but how to send the pdf file to required email id.. any body can help this.. Thnxs..
1
by: asger_gronnow | last post by:
Hi I'm having trouble associating file types with my app. Associating a file type works as long as the file type is already associated with another program but if the file type doesn't exist...
3
by: Eric Lilja | last post by:
Sorry for asking so many questions, but I've just started and need to get some things working so I can do the task that is before me. Consider this (validating) schema: <?xml version="1.0"?>...
2
by: =?Utf-8?B?UGF1bCBMaW52aWxsZQ==?= | last post by:
I have a solution that has both c# and vb.net projects. Visual Studio 2005 sp1. One of the lower level asseblies "Utils.csproj" is a c# project that references a 3rd party dll "Framework.dll"....
3
idsanjeev
by: idsanjeev | last post by:
Hi i am very new in .net using vb some file downloaded to learn but when excute file the error is System.InvalidOperationException: The file web.sitemap required by XmlSiteMapProvider does not...
1
by: TooMuch2AM | last post by:
In need of some good advice on 'consolidating' an XML file into another folks. Hope you can help! My souce XML looks like so: <?xml version="1.0" encoding="utf-8"?> <vehicles> <make...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.