asp.net - Custom SiteMapProvider derived from XMLSiteMapProvider : How to load an xml document directly in BuildSiteMap() -


Each of our users needs to load a different XML Sitemap which logs in. This sitemap can come from a variety of sources (Webservice, database, file) and to be loaded at runtime.

I designed it this way: When a user logs in, the custom XML is loaded for that user and put in session. In the BuildSiteMap () method of my custom SiteMapProvider, I have to load XML as a Sitemap, I know how to do this node-by-node, but my question is: If XMLSiteMapProvider loads sitemap data from an XML file Can I do this with an in-memory sitemap file (to change my XML)

While it should be technically possible, I do not think it will be a good approach Because this is contrary to the idea of ​​a sitemap, which handles full site navigation and authorization by specifying users / groups for each node.

xml version = "1.0" encoding = "UTF-8"? & Gt; Sitemap & gt; & lt;! - Other & lt; siteMapNode & gt; element - & gt; siteMapNode title = "support" description = "help" url = "~ / Customer / support.aspx" roles = "customer" />

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -