Re: Needing to preserve a custom Principal...

Efran Cobisi <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Organization QBGROUP SpA
Message-ID <[email protected]>
Or... You can implement a custom membership provider [1].
I was missing the easier way... My mistake.

[1] http://msdn2.microsoft.com/en-us/library/aa479048.aspx

HTH,

Efran Cobisi
http://www.cobisi.com

Efran Cobisi wrote:
> Hi Mike,
>
> Normally you would hold a token inside your FormsAuthentication ticket.
> FormsAuthentication.RedirectFromLoginPage() method lets you store this
> token that, in turn, would be available for subsequent authenticated
> requests via Context.User.Identity property, which appears to be an
> instance of the FormsIdentity type, under this kind of authentication.
> Using that token would let you reload your custom IPrincipal
> implementation on each subsequent request and assign it to the
> Context.User, for the life of the request. Although I don't recommend
> it, you could eventually save your custom IPrincipal istance in the
> session state and later retrieve it, exploiting the aforementioned
> methods.
>
> HTH,
>
> Efran Cobisi
> http://www.cobisi.com
>
> Mike Andrews wrote:
>> Guys,
>>
>> Is it possible to preserve a custom object that implements IPrincipal
>> across
>> multiple pages in an ASP.NET 2.0 website?
>>
>> I'm beginning to believe it's not and that I'll have to authenticate to
>> every page.  Or is there something I'm missing?
>> I'm using Forms authentication.
>>
>> Thanks,
>> Mike
>>
>> ===================================
>> This list is hosted by DevelopMentor®  http://www.develop.com
>>
>> View archives and manage your subscription(s) at
>> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor®  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.