By default, ASP.NET site navigation works with an XML file named Web.sitemap, which describes the hierarchy of your Web site. However, you might want to describe information about your site in some other way, such as in a database, or a site-map file that has a different layout than the Web.sitemap file.
How ASP.NET Uses Site Navigation Providers
Like ASP.NET membership, ASP.NET Web parts personalization, and other ASP.NET features, ASP.NET site navigation uses providers to interact with the data store. The default provider reads the Web.sitemap file and creates the
If you want to store site-map information in a location other than the site-map file, you can create your own site-map provider and configure your application to call the custom provider. The site-map provider is configured in the Web.config file. When the application runs, ASP.NET will invoke your provider, which can retrieve site-map information as needed. ASP.NET then creates and populates the
Security Note |
---|
Implementing a custom site-map provider that stores site-map data in a file with a file name extension other than .sitemap is a potential security risk. By default, ASP.NET is configured to protect files with known file name extensions — such as .sitemap — from being downloaded by a client. To help protect your data, place any custom site-map data files that have a file name extension other than .sitemap in the App_Data folder. For more information, see Securing ASP.NET Site Navigation. |
See Also
Tasks
How to: Configure Multiple Site Maps and Site-Map ProvidersConcepts
ASP.NET Site Navigation OverviewSecuring ASP.NET Site Navigation
Securing Data Access