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

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top