Solved

registering multiple sitemaps

Posted on 2006-07-22
4
372 Views
Last Modified: 2008-03-10
I am trying to use multiple sitemaps.  I tried adding the following to the web.config file:

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings>
<add key="ConnectionString" value="Password=xxxxx;Persist Security Info=True;User ID=username;Initial Catalog=DBName;Data Source=SERVERNAME" />
</appSettings>
<system.web>
<siteMap defaultProvider="XmlSiteMapProvider">
<providers>
<add name="TopNavigationBar" type="System.Web.XmlSiteMapProvider" siteMapFile="~/NavigationMenus/TopNavigationBar.sitemap" />
<add name="LeftNavigationBar"type="System.Web.XmlSiteMapProvider" siteMapFile="~/NavigationMenus/LeftNavigationBar.sitemap" />
</providers>
</siteMap>
<compilation debug="true"/>
<authentication mode="Windows"/>
</system.web>
</configuration>

But, I recieved the following error: the provider 'XmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.

So, the default web.sitemap file in my root directory is no longer recognized.

Where did I go wrong?
0
Comment
Question by:-Dman100-
  • 2
  • 2
4 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17161727
Here is a good article describing multiple SiteMaps:

Examining ASP.NET 2.0's Site Navigation - Part 1
http://aspnet.4guysfromrolla.com/articles/111605-1.aspx

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
  <siteMapNode attributes>
    <siteMapNode attributes>
      <siteMapNode attributes>
      ...
    </siteMapNode>
    <siteMapNode attributes />
    ...    
    <siteMapNode attributes />
  </siteMapNode>
</siteMap>

Bob
0
 

Author Comment

by:-Dman100-
ID: 17161920
Bob,
Thanks for replying to my post.

I was just trying to figure out the cause of the error when adding the code to the web.config file to enable the use of more than one sitemap file.

If I remove the code, the app runs.

I want to use more than one sitemap file and the articles details how to implement multiple site maps by adding the additional providers in the web.config file.

When I added the code, I received the error.  Did I miss something?  Is there a syntax error?
0
 

Author Comment

by:-Dman100-
ID: 17162065
I figured it out....

I needed to change:

<siteMap defaultProvider="XmlSiteMapProvider">

to

<siteMap defaultProvider="AspNetXmlSiteMapProvider">
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17162732
Darn it, I was looking at, and looking at, and I couldn't see that (I hate when that happens!)

Bob
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question