using SiteMapPath with the roles defind in web.cofig to generate the sitemapPath menu
question:
can I use the sitemapPath along with the windows security and roles defined in web.config automatically to generate the menu
My need is to display the menu in sitemapPath automaticallly according to the logged in user. We are using windows authentication, the system should check to which roles he belongs to and if one of the roles has access to the different menu items in the sitemapPath.
Is that possible, is there any documentation link please?
Thanks a lot.
Re: using SiteMapPath with the roles defind in web.cofig to generate the sitemapPath menu
Hello there,
If you take a look at the post that I made in this thread, you will see that I created a sample application that does exactly what you are asking for.
Hope this helps!!
Gary
Re: using SiteMapPath with the roles defind in web.cofig to generate the sitemapPath menu
can we use it with windows authentication mode.
P.S: Thanks a lot, I will try it.
Re: using SiteMapPath with the roles defind in web.cofig to generate the sitemapPath menu
Hello
I have only ever used the built in authentication using the asp.net login controls. however, I am sure that you could adapt my code to use Windows Authentication instead.
Here is a link that may point you in the correct direction.
Gary
Re: using SiteMapPath with the roles defind in web.cofig to generate the sitemapPath menu
What you'll need to do is to create a role provider and membership provider. In these providers, you can perform your AD authentication and have it return your 'custom' roles. Then with securityTrimmings enabled, you can use the menu control as you'd like.