Does anyone have experience creating SQL-based ASP.NET site-map providers?
I have the default XML file web.sitemap
working properly with my Menu and SiteMapPath controls, but I'll need a way for the users of my site to create and modify pages dynamically.
I need to tie page viewing permissions into the standard ASP.NET
membership system as well.
The Jeff Prosise version from MSDN magazine works pretty well, but it has a few flaws:
AddNode
freaks out with links to external sites on your menu (www.google.com, etc.)Here's my fix in
BuildSiteMap()
:SQLDependency
caching is cool, but if you don't want to make a trip to the DB everytime your menu loads (to check to see if the dependency has changed) and your menus don't change very often, then why not useHttpRuntime.Cache
instead?