RE: How to share a Principal within a ThreadPool ?
From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 04/27/05
- Next message: Mark A. Richman: "Re: EventLogPermission via caspol.exe"
- Previous message: Dominick Baier [DevelopMentor]: "Re: How to share a Principal within a ThreadPool ?"
- In reply to: Aleksandr Sliborsky: "RE: How to share a Principal within a ThreadPool ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 27 Apr 2005 05:45:34 -0700
Hello Aleksandr,
That's not true. Context.User is for the current thread only. And you have
to do that for every request, e.g. in Application_AuthenticateRequest. This
is the recommended way of doing it.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
>> Hi,
>> when I set a Principal in the current thread, using :
>> Thread.CurentPrincipal =
>> the Principal object is not set in the other threads of the
>> application
>> threadpool.
>> Is there a special way to do that ?
>> Oriane
> If You write an ASP.NET application use Context.User instead of
> Thread.CurrentPrincipal.
> Contexct.User sets principal for all threads.
> You can also use AppDomain.SetThreadPrincipal
> But this method could be used only once.
- Next message: Mark A. Richman: "Re: EventLogPermission via caspol.exe"
- Previous message: Dominick Baier [DevelopMentor]: "Re: How to share a Principal within a ThreadPool ?"
- In reply to: Aleksandr Sliborsky: "RE: How to share a Principal within a ThreadPool ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]