I’m developing ASP.NET 4.0 Website using SQL server 2008 with Membership Framework. It runs fine so far with static navigation in my master page which uses static Web.SiteMap file to generate the Navigational Menu. I am wondering If there is any way to generate this file dynamically depending on the user’s role or Identity.
I would also like to know If there is any way to store this setting in database using membership framework so that I dont have to present each and every links to all users or roles who is not authorized to see some of pages in website or any other way to generate menu at runtime.
I’m developing ASP.NET 4.0 Website using SQL server 2008 with Membership Framework. It runs
Share
Take a look on
securityTrimmingEnabled="true", here’s some links:In general, using this option you’re enabling the check does current user’s role is allowed to visit current site map node.
Web.config:
Web.sitemap:
Custom site map provider: