Request.ServerVariables("Logon_User")

Discussion in 'ASP .Net' started by T., Oct 1, 2004.

  1. T.

    T. Guest

    Hello,

    I'm trying to pull the logon user's name using
    Request.ServerVariables("LOGON_USER")...which is returning nothing...so I
    need help in determining why it's returning nothing, or I need the format in
    which it returns the username so that I can hard code it. Does it return
    anything with the username?

    Thanks...
     
    T., Oct 1, 2004
    #1
    1. Advertising

  2. T.

    Shiva Guest

    Hi,
    It will be empty if anonymous access is allowed. Deny anonymous
    authentication and turn on Basic, Digest or Integrated auth to force
    authentication and hence get a value for LOGON_USER server variable.

    HTH

    "T." <> wrote in message
    news:OebCjr#...
    Hello,

    I'm trying to pull the logon user's name using
    Request.ServerVariables("LOGON_USER")...which is returning nothing...so I
    need help in determining why it's returning nothing, or I need the format in
    which it returns the username so that I can hard code it. Does it return
    anything with the username?

    Thanks...
     
    Shiva, Oct 1, 2004
    #2
    1. Advertising

  3. T.

    T. Guest

    Shiva my friend...this is exactly what I did...and no luck.

    strLoginID = Request.ServerVariables("LOGON_USER")
    response.write strLoginID

    Returns nothing....

    "Shiva" <> wrote in message
    news:uyQYwy#...
    > Hi,
    > It will be empty if anonymous access is allowed. Deny anonymous
    > authentication and turn on Basic, Digest or Integrated auth to force
    > authentication and hence get a value for LOGON_USER server variable.
    >
    > HTH
    >
    > "T." <> wrote in message
    > news:OebCjr#...
    > Hello,
    >
    > I'm trying to pull the logon user's name using
    > Request.ServerVariables("LOGON_USER")...which is returning nothing...so I
    > need help in determining why it's returning nothing, or I need the format

    in
    > which it returns the username so that I can hard code it. Does it return
    > anything with the username?
    >
    > Thanks...
    >
    >
    >
     
    T., Oct 1, 2004
    #3
  4. T.

    Marina Guest

    Do you have only windows authentication on, on the virtual directory your
    app is in?

    "T." <> wrote in message
    news:O3ccu7%...
    > Shiva my friend...this is exactly what I did...and no luck.
    >
    > strLoginID = Request.ServerVariables("LOGON_USER")
    > response.write strLoginID
    >
    > Returns nothing....
    >
    > "Shiva" <> wrote in message
    > news:uyQYwy#...
    > > Hi,
    > > It will be empty if anonymous access is allowed. Deny anonymous
    > > authentication and turn on Basic, Digest or Integrated auth to force
    > > authentication and hence get a value for LOGON_USER server variable.
    > >
    > > HTH
    > >
    > > "T." <> wrote in message
    > > news:OebCjr#...
    > > Hello,
    > >
    > > I'm trying to pull the logon user's name using
    > > Request.ServerVariables("LOGON_USER")...which is returning nothing...so

    I
    > > need help in determining why it's returning nothing, or I need the

    format
    > in
    > > which it returns the username so that I can hard code it. Does it

    return
    > > anything with the username?
    > >
    > > Thanks...
    > >
    > >
    > >

    >
    >
     
    Marina, Oct 1, 2004
    #4
  5. T.

    T. Guest

    That option is selected but not available...so I tried every possible
    combinations for those options...also my web.config authenication is set to
    "Windows"


    "Marina" <> wrote in message
    news:e8dtuA$...
    > Do you have only windows authentication on, on the virtual directory your
    > app is in?
    >
    > "T." <> wrote in message
    > news:O3ccu7%...
    > > Shiva my friend...this is exactly what I did...and no luck.
    > >
    > > strLoginID = Request.ServerVariables("LOGON_USER")
    > > response.write strLoginID
    > >
    > > Returns nothing....
    > >
    > > "Shiva" <> wrote in message
    > > news:uyQYwy#...
    > > > Hi,
    > > > It will be empty if anonymous access is allowed. Deny anonymous
    > > > authentication and turn on Basic, Digest or Integrated auth to force
    > > > authentication and hence get a value for LOGON_USER server variable.
    > > >
    > > > HTH
    > > >
    > > > "T." <> wrote in message
    > > > news:OebCjr#...
    > > > Hello,
    > > >
    > > > I'm trying to pull the logon user's name using
    > > > Request.ServerVariables("LOGON_USER")...which is returning

    nothing...so
    > I
    > > > need help in determining why it's returning nothing, or I need the

    > format
    > > in
    > > > which it returns the username so that I can hard code it. Does it

    > return
    > > > anything with the username?
    > > >
    > > > Thanks...
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    T., Oct 1, 2004
    #5
  6. What do you mean the option for integrated authentication is "selected but
    not available"?

    If you are using NT authentication, dump the logon_user lookup and go with
    User.Idenity.Name.

    bill

    "T." <> wrote in message
    news:%23Wis3F$...
    > That option is selected but not available...so I tried every possible
    > combinations for those options...also my web.config authenication is set

    to
    > "Windows"
    >
    >
    > "Marina" <> wrote in message
    > news:e8dtuA$...
    > > Do you have only windows authentication on, on the virtual directory

    your
    > > app is in?
    > >
    > > "T." <> wrote in message
    > > news:O3ccu7%...
    > > > Shiva my friend...this is exactly what I did...and no luck.
    > > >
    > > > strLoginID = Request.ServerVariables("LOGON_USER")
    > > > response.write strLoginID
    > > >
    > > > Returns nothing....
    > > >
    > > > "Shiva" <> wrote in message
    > > > news:uyQYwy#...
    > > > > Hi,
    > > > > It will be empty if anonymous access is allowed. Deny anonymous
    > > > > authentication and turn on Basic, Digest or Integrated auth to force
    > > > > authentication and hence get a value for LOGON_USER server variable.
    > > > >
    > > > > HTH
    > > > >
    > > > > "T." <> wrote in message
    > > > > news:OebCjr#...
    > > > > Hello,
    > > > >
    > > > > I'm trying to pull the logon user's name using
    > > > > Request.ServerVariables("LOGON_USER")...which is returning

    > nothing...so
    > > I
    > > > > need help in determining why it's returning nothing, or I need the

    > > format
    > > > in
    > > > > which it returns the username so that I can hard code it. Does it

    > > return
    > > > > anything with the username?
    > > > >
    > > > > Thanks...
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    William F. Robertson, Jr., Oct 1, 2004
    #6
  7. T.

    vandtran

    Joined:
    Nov 18, 2008
    Messages:
    1
    Hi,

    In my virtual directory security, whenever I disable the anonymous access and Integrated windows authentication checked, users from my intranet site have to logon with there windows login. Is there a way to bypass the logon?

    Thanks,
     
    vandtran, Nov 18, 2008
    #7
  8. T.

    RiaanBod

    Joined:
    Apr 28, 2011
    Messages:
    1
    Request.ServerVariables("LOGON_USER") displays login info, but it displays the user logged on to the server and not the local user name.
     
    RiaanBod, Apr 28, 2011
    #8
    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. Amitava Bardhan
    Replies:
    1
    Views:
    2,936
    Marina
    May 17, 2005
  2. =?Utf-8?B?THluZXJz?=
    Replies:
    0
    Views:
    1,409
    =?Utf-8?B?THluZXJz?=
    Dec 5, 2005
  3. Replies:
    1
    Views:
    1,624
    Göran Andersson
    Nov 29, 2008
  4. Charles Evans
    Replies:
    0
    Views:
    415
    Charles Evans
    Sep 10, 2003
  5. Dave Karmens
    Replies:
    5
    Views:
    1,154
    Roland Hall
    Apr 22, 2004
Loading...

Share This Page