Solved

registering multiple sitemaps

Posted on 2006-07-22
4
370 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now