Re: Custom IIdentity class - how to set it?
From: John Saunders (john.saunders)
Date: 02/20/04
- Next message: John Saunders: "Re: Performance Issues / ASP.NET"
- Previous message: John Saunders: "Re: Rebinding page after image is resized on server not showing new sized image"
- In reply to: Tim Mulholland: "Custom IIdentity class - how to set it?"
- Next in thread: Tim Mulholland: "Re: Custom IIdentity class - how to set it?"
- Reply: Tim Mulholland: "Re: Custom IIdentity class - how to set it?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 20 Feb 2004 15:43:20 -0500
"Tim Mulholland" <TimMulholland@nospamaddress.com> wrote in message
news:uBJBcX99DHA.1116@TK2MSFTNGP09.phx.gbl...
> I have created my own IIdentity class (actually inherited from
> GenericIdentity) to contain lots of extra useful information to be passed
> around with the user's basic information.
> The class compiles fine, no problems there.
>
> My problem is that i'm not sure where to actually set this to be part of
the
> HttpContext. I know that the IIdentity stuff is part of a principal (which
> in my case will be a GenericPrinciple i suppose since i'm using forms
> authentication). So i figure it needs to be whenever the HttpContext.User
> object is set.
>
> What event is raised that i need to handle to be able to do this? I'm
going
> to be controlling all of the authentication using custom forms
> authentication.
You need to do this sort of thing in the Application_AuthenticateRequest
event in global.asax.
Be sure to check Request.IsAuthenticated, first, though!
-- John Saunders John.Saunders at SurfControl.com
- Next message: John Saunders: "Re: Performance Issues / ASP.NET"
- Previous message: John Saunders: "Re: Rebinding page after image is resized on server not showing new sized image"
- In reply to: Tim Mulholland: "Custom IIdentity class - how to set it?"
- Next in thread: Tim Mulholland: "Re: Custom IIdentity class - how to set it?"
- Reply: Tim Mulholland: "Re: Custom IIdentity class - how to set it?"
- Messages sorted by: [ date ] [ thread ]