asp.net - Multiple roles in ASP Menu -


i have problem asp.net menu. have parent menu 3 childs. 2 of child have anonymous access, , 1 child have role base access. parent has access e.g : parent - child - child b - child c

child & b have anonymous acces, or in role can use "*" character. child c show specific role, not anonymous.

how can set role parent ? child a, b , c in asp.net menu (.net framework 4) used sqlsitemapprovider.

you can set parent role "*" well. long child c has it's role specified, filtered out accordingly.

so example this:

parent roles="*"   childa roles="*"   childb roles="*"   childc roles="rolec" 

if had specific roles each node set roles this:

parent roles="rolea,roleb,rolec"   childa roles="rolea"   childb roles="roleb"   childc roles="rolec" 

to have these filtered based on these roles need enable security trimming in web.config. guide can found here: http://msdn.microsoft.com/en-us/library/ms178428.aspx

the security trimming based on access rules define (guide here: http://msdn.microsoft.com/en-us/library/9ab2fxh0.aspx).

explicitly setting roles suggested above not restrict viewing of linked pages or menu items themselves. done avoid url authorization calls (checking access rules each linked item) , therefore performance. it's idea, not thing needs done.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -