Hi,
I have an application that is using a Menu control with securityTrimming enabled. I understand ( but I might be wrong here!) that this control uses the default Role provider in the web.config to determine what to show and what not, according to the roles the user belongs to.
I wrote my own custom Role provider, and everything works fine when I manually especify the provider as the defaultProvider in the roleManager section of the web.config file
<
roleManager enabled="true" defaultProvider="LDAPRoleProvider">
<providers>
...
Well. Here is my problem. I need to be able to switch AT RUNTIME which RoleProvider the Menu control uses. The Menu control only exposes a read only property to show which provider is using.
How can I change dynamically the default Membersip provider? Or, how can I tell the Menu control, at runtime, what provider to use?
It has been a full day already that I spent with this, so any help it would be highly appreciatted..
Thanks.