HttpContext.Current.User vs. Thread.CurrentPrincipal

Discussion in 'ASP .Net Security' started by Michael Ames, Nov 13, 2003.

  1. Michael Ames

    Michael Ames Guest

    How are HttpConext.Current.User and Thread.CurrentPrincipal different?

    It seems that they can be set differently in different places. Why would
    one use one and not the other?

    Thanks,

    Michael
    Michael Ames, Nov 13, 2003
    #1
    1. Advertising

  2. Use HttpConext.Current.User for all web (ASPX/ASMX) applications.

    Use Thread.CurrentPrincipal for all other applications like winForms,
    console and windows service applications.

    ASP.NET support various authentication schemes in additions to windows
    authentication.



    Use How are HttpConext.Current.User for web application, more precisly
    "Michael Ames" <michaelames@(remove)email.com> wrote in message
    news:...
    > How are HttpConext.Current.User and Thread.CurrentPrincipal different?
    >
    > It seems that they can be set differently in different places. Why would
    > one use one and not the other?
    >
    > Thanks,
    >
    > Michael
    >
    >
    Ram Sunkara [msft], Nov 14, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon Paugh
    Replies:
    0
    Views:
    390
    Jon Paugh
    Jan 22, 2004
  2. Mike Newton
    Replies:
    0
    Views:
    2,858
    Mike Newton
    Jul 23, 2004
  3. Steve C. Orr [MVP, MCSD]
    Replies:
    0
    Views:
    1,581
    Steve C. Orr [MVP, MCSD]
    Jul 23, 2004
  4. Replies:
    5
    Views:
    2,206
    Dominick Baier [DevelopMentor]
    Nov 8, 2005
  5. Tony

    Dim context As HttpContext = HttpContext.Current

    Tony, Mar 2, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    287
    Teemu Keiski
    Mar 3, 2004
Loading...

Share This Page