Deny acces to users that are not in any role

M

Markus Palme

Hi NG!

Is it possible to deny access to a (logged in) user that is not in any
role? Placeholders like <deny roles="?"/> don't seem to be possible.

Regards
Markus

<location path="Protected.aspx">
<system.web>
<authorization>
<allow roles="Administrator"/>
<deny roles="Staff"/>
</authorization>
</system.web>
</location>
 
C

Cowboy \(Gregory A. Beamer\)

As long as you do not have an allow rule higher up, it will automatically
deny all roles that are not allowed. If you have a generic rule higher that
allows access, then you do have to explicitly deny. You can deny generically
for roles ... but you can for users. Thus, this is valid:

<location path="Protected.aspx">
<system.web>
<authorization>
<allow roles="Administrator"/>
<deny users="*"/>
</authorization>
</system.web>
</location>

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top