Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using non-default sitemap in .NET 2.0 1

Status
Not open for further replies.

Craftor

Programmer
Joined
Feb 1, 2001
Messages
420
Location
NZ
Hi all

I'm trying to implement the SiteMap component in a web page. The MSDN pages I've read seem to indicate that you can name the .sitemap file something other than web.sitemap. My site will have several different sitemaps, depending on where in the site the user is navigating.

With nothing specified in the web.config file, I get the following error:
The file web.sitemap required by XmlSiteMapProvider does not exist.

If I use the example provided on the MSDN pages ...
Code:
<siteMap defaultProvider="XmlSiteMapProvider">
	<providers>
		<add
			name="BRCSiteMap"
			type="System.Web.XmlSiteMapProvider"
			siteMapFile="~/brc.sitemap"/>
	</providers>
</siteMap>

I get the following error:

Configuration Error
Parser Error Message: The provider 'XmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.


How can I indicate to my menu control referencing this sitemap that it should use the brc.sitemap file and not look for the default web.sitemap?

Thanks as always

Craftor
8-)
 
Default provider should be "BRCSiteMap", not XmlSiteMapProvider.

Good luck!

Brian Begy
BugSentry - Automatic error reporting for .NET and COM
 
Wow, I can't believe it was as easy as that!

Thanks Brian, that fixed the problem.

Craftor
8-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top