Re: Role based Security in ASP.Net
From: Gregor Streng (gregorstreng@jamieplc.com)
Date: 01/22/03
- Next message: Mads Jacobsen: "Forms Auth and codebehind"
- Previous message: Bassel Tabbara [MSFT]: "Re: Access denied ( From one site to another, that is in another server)"
- In reply to: Eric Lyons: "Role based Security in ASP.Net"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Gregor Streng" <gregorstreng@jamieplc.com> Date: Wed, 22 Jan 2003 16:10:08 -0000
Hi Eric,
I personally would do it this way.
Let ASP.NET do the authorization based on your web.config.
When a user gets redirected by ASP.NET because the resource requires more
permission.
You can easily check on the logon page if the user is already authenticated
or not.
If the user is already authenticated and she/he gets redirected to the logon
page then
because she/he has not the required permissions.
At this point you can redirect the user to your own personal access denied
or just send
a HTTP 403.
Hope this helps,
Gregor
"Eric Lyons" <EricLyons1@comcast.net> wrote in message
news:O11fEIcwCHA.2288@TK2MSFTNGP09...
> I know this has been asked a lot but I'm having a small problem. I've
read
> all the articles and I have form and role security working. The problem
is
> requesting a page that has a role specified (Let's say "Admin") after a
user
> has already logged in and the user doesn't have the role assigned to them.
> What happens is the user is redirected to login url because the user
doesn't
> have the role assigned. Is there a way I can detect this somehow and
> redirect to an access denied page or something. I know I can check the
role
> in code on every page in that directory but that defeats the roles in the
> web config. Thanks for any information or examples.
>
> Eric Lyons
>
>
- Next message: Mads Jacobsen: "Forms Auth and codebehind"
- Previous message: Bassel Tabbara [MSFT]: "Re: Access denied ( From one site to another, that is in another server)"
- In reply to: Eric Lyons: "Role based Security in ASP.Net"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|