Re: Forms Authentication behavior on request denial
From: Paul Hatcher (phatcher@cix.co.uk)
Date: 03/29/03
- Next message: iMonkey: "Forms-Based protecting too much"
- Previous message: MS News: "Microsoft Certificate Services"
- In reply to: David Dabbs: "Re: Forms Authentication behavior on request denial"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Paul Hatcher" <phatcher@cix.co.uk> Date: Sat, 29 Mar 2003 05:56:26 -0800
Role based authorisation is not supported out of the box
by Forms Authentication.
What you can do is write a page template to perform the
work for you - e.g. read the web.config to get the list of
roles authorised and then check if they are authorised.
You could then also get around your authorisation problem
by explicitly redirecting authenticated, unauthorised
users to the correct page.
Paul
>-----Original Message-----
>"John Saunders" <john.saunders@surfcontrol.com> wrote in
message
>
>> You're seeing the expected behavior. This is how Forms
Authentication
>works.
>
>John,
>
>Thanks for the reply.
>
>Shouldn't a user who is not allowed access to a resource
be redirected to an
>"Access Denied" page as opposed to the Login page?
>
>I get the same (undesired) behavior when I set the
<authorization> as
>follows in the protected directory.
>
><authorization>
> <deny users="?" />
> <allow roles="Allowed Role, Etc" />
></authorization>
>
>As expected, all users are redirected to login.
>But ALL authenticated users who redirect back to the
originally requested
>page
>are allowed access, not simply the ones who have
the "Allowed Role" role.
>Shouldn't the authenticated users NOT in the <allow
roles> setting be denied
>access?
>If not, then I need to PROGRAMMATICALLY add checks for
IsInRole() to every
>page. Yuck.
>
>Thanks,
>
>David Dabbs
>
>
>.
>
- Next message: iMonkey: "Forms-Based protecting too much"
- Previous message: MS News: "Microsoft Certificate Services"
- In reply to: David Dabbs: "Re: Forms Authentication behavior on request denial"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|