Need help improving authorization
From: AndiV (andiv_at_yahoo.com)
Date: 07/21/04
- Next message: Pepehammer: "Re: I can't see a functions between classes"
- Previous message: John Saunders: "Re: I can't see a functions between classes"
- Next in thread: Chris Simmons: "Re: Need help improving authorization"
- Reply: Chris Simmons: "Re: Need help improving authorization"
- Reply: Joe Fallon: "Re: Need help improving authorization"
- Reply: AndiV: "Re: Need help improving authorization"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Jul 2004 11:11:25 -0700
Each of my intranet page (windows authentication) needs to validate user's
roles stored in the database. Currently, I retrieve the the
User.Identity.Name property, then query the database for user's roles
everytime a page is loaded, which is very inefficient.
I think a more efficient approach would be to query the database only once
for each user, the application_start event is probably the best place? Once
this particular user's roles are retrieved, the roles can be concatenated as
a delimied string and stored in cookie or a session variable. Then on each
page load event, I just have to parse the roles string to apply
authorization.
I believe this scheme will work. But it seems more like a hack than a design
pattern or a best practice. I'm seeking a .NET elegant solution. Please
advise.
TIA,
Andi
- Next message: Pepehammer: "Re: I can't see a functions between classes"
- Previous message: John Saunders: "Re: I can't see a functions between classes"
- Next in thread: Chris Simmons: "Re: Need help improving authorization"
- Reply: Chris Simmons: "Re: Need help improving authorization"
- Reply: Joe Fallon: "Re: Need help improving authorization"
- Reply: AndiV: "Re: Need help improving authorization"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|