Hide authorized menu item in asp.net web.sitemap -


I have a web with security trimming enabled. There is a sitemap, but I need to hide the menu items based on a role on the page that there is no access rule on the web. Configure

That is, I have a campaign page that is used to view existing campaigns as well as to add new campaigns, but I want the "new campaign" menu item for anonymous users I tried to add a role name to the roles in the web sitemap but it did not have any effect.

I'm sure the sitemap provider should be a quick way to do this without modifying the port of my next call.

If this is only a special case for an anonymous user, then you have a second Sitemap.

Create a new file, WebAnon.sitemap.
Create a new sitemap provider in the web. Config

  & lt; Add name = "anonprovider" type = "System.Web.XmlSiteMapProvider" siteMapFile = "WebAnon.sitemap" securityarmming = "right" /> 

P>


Comments