Re: Authorization question, w/ "Windows" authentication mode
- From: "Joe Kaplan \(MVP - ADSI\)" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 12:37:58 -0500
I agree with D. You are really implementing a performance optimization
here, so cache is the most appropriate storage to use.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Dominick Baier [DevelopMentor]" <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in message news:4580be631a1a338c869c44c7fc4c2@xxxxxxxxxxxxxxxxxxxxx
Hi,
session is not available in Post/AuthenticateRequest - i would use the
cache or a cookie
cache has the advantage of being self managed and server only
if cookie i would use the userData field of the FormsAuth ticket - this
gives you encryption and integrity protection + renewal for free
In both cases (a little easier with the cache) - you should periodically
check if the user is still valid and the group memberships are still OK -
otherwise you end up with stale information - especially if sliding
expiration is used.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Joe Kaplan (MVP - ADSI) wrote:
To avoid a database hit, you can use the cache or use session stateactually, i think the options may be limited to the Cache or a cookie.
or perhaps a cookie
it appears the Session object doesnt yet exist "Session_Start()" is
executed *after* "Application_AuthenticateRequest()".
i had thought perhap i could just check for Session being null, if so
grab from db, and that after page hit-one Session should then exist.
but...it doesnt. dah!
so it looks like Cache or cookie are the only options. if i did Cache
i supposed id use a unique key based off the userID, w/ a short
time-to-live.
matt
.
- Follow-Ups:
- References:
- Re: Authorization question, w/ "Windows" authentication mode
- From: matt
- Re: Authorization question, w/ "Windows" authentication mode
- From: Dominick Baier [DevelopMentor]
- Re: Authorization question, w/ "Windows" authentication mode
- Prev by Date: Re: Authorization question, w/ "Windows" authentication mode
- Next by Date: Re: Authorization question, w/ "Windows" authentication mode
- Previous by thread: Re: Authorization question, w/ "Windows" authentication mode
- Next by thread: Re: Authorization question, w/ "Windows" authentication mode
- Index(es):
Relevant Pages
|
|