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 wOOdy-Soft 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
Feb 1, 2001
420
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
:cool:
 
Wow, I can't believe it was as easy as that!

Thanks Brian, that fixed the problem.

Craftor
:cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top