Thread.CurrentPrincipal.Identity.Name

Discussion in 'ASP .Net' started by Ken, Nov 14, 2007.

  1. Ken

    Ken Guest

    I'm testing on web application (.net 1.1 using C#).
    when I tested the application on local machine (IIS5.0,XP professinal), it
    return value for Thread.CurrentPrincipal.Identity.Name
    However, When I tested the same application on the server (IIS6.0, 2003
    Server), it return nothing for
    Thread.CurrentPrincipal.Identity.Name.
    the application setuped

    anybody has idea?
     
    Ken, Nov 14, 2007
    #1
    1. Advertising

  2. you shouldn't be using the thread identity (as its usually the asp.net
    account). You shoudl be using HttpRequest.LogonUserIdentity.

    -- bruce (sqlwork.com)


    "Ken" wrote:

    > I'm testing on web application (.net 1.1 using C#).
    > when I tested the application on local machine (IIS5.0,XP professinal), it
    > return value for Thread.CurrentPrincipal.Identity.Name
    > However, When I tested the same application on the server (IIS6.0, 2003
    > Server), it return nothing for
    > Thread.CurrentPrincipal.Identity.Name.
    > the application setuped
    >
    > anybody has idea?
    >
    >
    >
     
    =?Utf-8?B?YnJ1Y2UgYmFya2VyIChzcWx3b3JrLmNvbSk=?=, Nov 14, 2007
    #2
    1. Advertising

  3. Ken

    Ken Guest

    I think HttpRequest.LogonUserIdentity is available from .net 3.0

    I'm using 1.1.

    "bruce barker (sqlwork.com)"
    <> wrote in message
    news:...
    > you shouldn't be using the thread identity (as its usually the asp.net
    > account). You shoudl be using HttpRequest.LogonUserIdentity.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Ken" wrote:
    >
    >> I'm testing on web application (.net 1.1 using C#).
    >> when I tested the application on local machine (IIS5.0,XP professinal),
    >> it
    >> return value for Thread.CurrentPrincipal.Identity.Name
    >> However, When I tested the same application on the server (IIS6.0, 2003
    >> Server), it return nothing for
    >> Thread.CurrentPrincipal.Identity.Name.
    >> the application setuped
    >>
    >> anybody has idea?
    >>
    >>
    >>
     
    Ken, Nov 14, 2007
    #3
    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:
    413
    Jon Paugh
    Jan 22, 2004
  2. nalbayo
    Replies:
    2
    Views:
    5,600
    Bruce Barker
    Nov 11, 2005
  3. Brian Stoop
    Replies:
    1
    Views:
    424
    Brian Stoop
    May 9, 2008
  4. Dune88
    Replies:
    0
    Views:
    350
    Dune88
    Oct 10, 2008
  5. John K
    Replies:
    8
    Views:
    360
    Dominick Baier [DevelopMentor]
    Sep 20, 2005
Loading...

Share This Page