Help on protect sub-directories with roles

L

Luca

I am trying to protect sub-directories making use of the web.config
<location>-tag.
Additionally I would like to make us of my internal roles instead of the
user(names). I.e.:

<location path="web/admin">
<authorization>
<allow roles="Super Administrators"/>
<deny users="?"/>
<authorization>
</location>

This does NOT seem to work! On the other hand

<location path="web/admin">
<authorization>
<allow roles="sa"/>
<deny users="?"/>
<authorization>
</location>

does work.
I would have expected that in the former case the IPrincipal>>IsInRole
method is called, but this is not the case.

Can anybody enlighten me on how to make rolebased authorization, or am I
trying to do soemthing impossible.

thx all!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top