Re: Persist login does not work
From: Eric Marvets (ericm_at_bangproject.com)
Date: 05/24/04
- Next message: Ollie: ""Access Denied" to ICatalogCollection from asp.net web service"
- Previous message: Svein Terje Gaup: "Re: Persist login does not work"
- In reply to: Svein Terje Gaup: "Re: Persist login does not work"
- Next in thread: Svein Terje Gaup: "Re: Persist login does not work"
- Reply: Svein Terje Gaup: "Re: Persist login does not work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 23 May 2004 19:46:54 -0400
The Request.Cookies collection does not show the cookie expiration
information?
I don't know why it doesn't work. The whole Forms based authentication
system has some flaws in my opinion, but I don't know why the designers of
the framework built it the way they did. It does not follow the IIdentity
and IPrincipal authentication and authorization strategy that is used
throughout the rest of the framework. Maybe there was some perfomance or
size considerations involved.
I have taken a different approach to this in the past. I use Forms based
authentication the way all the samples show, using the RedirectFromLogin
page, which does persist the login info. For the username I use the UserID.
I use the UserID to create my custom IIdentity and IPrincipal objects and
attach them to the Thread.CurrentPrincipal property which will follow the
user around until that particular request is over.
Ususally I have cached all the logged in users to I don't have to retrieve
the object so frequently from the database (doesn't work with a server farm,
in that case its a database call everytime). You could do the same, and if
it doesn't exist in the cache (persisted forms ticket from a few days ago),
then retreive it from the database.
-- Eric Marvets Principal Consultant the bang project <shameless self promotion> Email sales@bangproject.com for Information on Our Architecture and Mentoring Services </shameless self promotion>
- Next message: Ollie: ""Access Denied" to ICatalogCollection from asp.net web service"
- Previous message: Svein Terje Gaup: "Re: Persist login does not work"
- In reply to: Svein Terje Gaup: "Re: Persist login does not work"
- Next in thread: Svein Terje Gaup: "Re: Persist login does not work"
- Reply: Svein Terje Gaup: "Re: Persist login does not work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|