Re: Method SetThreadPrincipal

From: Nicole Calinoiu (calinoiu)
Date: 05/17/05


Date: Tue, 17 May 2005 14:16:08 -0400

I'm guessing that there's probably no reason for more than one thread to be
running after the user logs off since the applicaiton is presumably just
sitting around waiting for another user to log in. If I'm right about this,
your best bet may simply be to explicitly set the principal for each thread
as you initialize it in your code. If there's some additional requirement
that would make this impractical, could you please explain?

"Oriane" <Oriane@Guermantes.com> wrote in message
news:e7c%23PHwWFHA.3324@TK2MSFTNGP09.phx.gbl...
>> Why would you want to do this, particularly given that you're probably
>> not
>> actually using all threads in the pool? Perhaps if you could describe
>> the
>> scenario in which this principal change is being made, someone might be
> able
>> to suggest a better mechanism...
> It's very simple indeed. An applicative user logs in on my application,
> which has of course many threads, and I use the .NET mechanism for the
> .NET
> role based security, base on a generic principal, that I set with
> SetThreadPrincipal. It seemed to me that it was the "canonical" process.
>
> A user may want to log out. I agree that a logout could be seen as en
> applicatin exit. But the people from the business layer ask me for a
> logout
> function.
>
> Anyway if this is impossible, I suppose this is for good reasons and I
> don't
> want to waste my time trying to bypass the standard mechanism.
>
> Thanks a lot
>
>



Relevant Pages

  • Unknown connection made
    ... Can someone please tell me why (for what reason) my system insists on making ... a connection to http://sa.windows.com right after it has been booted and the ... user logs on. ...
    (microsoft.public.windowsxp.general)
  • Re: GetUser.ProviderUserKey gives me System.NullReferenceException
    ... loginredirect.aspx page after the user logs in. ... For some reason "Membership.GetUser.ProviderUserKey.ToString" gives me ... Object reference not set to an instance of ... Step through that code in the debugger to find out if it goes down the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: how to make a program run before windows starts to boot
    ... all of these events occour after the user logs in. ... if, for some reason, someone gets ... but the task manager only runs stuff after a ... >>time, in the boot process, that chkdsk runs. ...
    (microsoft.public.windowsxp.general)
  • NEC laptop keyboard stops working on logout
    ... I created an extra user when I got the NEC Versa E680 laptop and logout and ... But after updating security patches it no longer works. ... user logs out the keyboard no longer works and you have to reboot. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Method SetThreadPrincipal
    ... we finaly agree that the log out functionnality was not required. ... > I'm guessing that there's probably no reason for more than one thread to ... > running after the user logs off since the applicaiton is presumably just ...
    (microsoft.public.dotnet.security)