C
Chris Leffer
Hi.
I would like to confirm a behaviour in the authorization element from
the web.config file. Suppose the following (using Forms authentication):
<authorization>
<deny users="?" />
<deny users="User1" />
<allow users="User1" />
</authorization>
When I try to logon as the User1, I am not redirected to my default
page. But if I change the elements to:
<authorization>
<deny users="?" />
<allow users="User1" />
<deny users="User1" />
</authorization>
I am redirected. It leads me to imagine that there is not some
precedence between the allow and deny tags, so the user will be allowed
or denied to access based on the configuration that first appears. Is it
right?
If using windows authentication, suppose the User1 is in the Admins role
and the configuration is:
<authorization>
<allow roles="Admins" />
<deny users="User1" />
</authorization>
Will the user be denied or allowed to access the site resources?
Regards,
Chris Leffer
I would like to confirm a behaviour in the authorization element from
the web.config file. Suppose the following (using Forms authentication):
<authorization>
<deny users="?" />
<deny users="User1" />
<allow users="User1" />
</authorization>
When I try to logon as the User1, I am not redirected to my default
page. But if I change the elements to:
<authorization>
<deny users="?" />
<allow users="User1" />
<deny users="User1" />
</authorization>
I am redirected. It leads me to imagine that there is not some
precedence between the allow and deny tags, so the user will be allowed
or denied to access based on the configuration that first appears. Is it
right?
If using windows authentication, suppose the User1 is in the Admins role
and the configuration is:
<authorization>
<allow roles="Admins" />
<deny users="User1" />
</authorization>
Will the user be denied or allowed to access the site resources?
Regards,
Chris Leffer