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. Advertisements

  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

    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. Advertisements

  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....
     
    T., Oct 1, 2004
    #3
  4. T.

    Marina Guest

    Do you have only windows authentication on, on the virtual directory your
    app is in?
     
    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"
     
    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
     
    William F. Robertson, Jr., Oct 1, 2004
    #6
  7. T.

    vandtran

    Joined:
    Nov 18, 2008
    Messages:
    1
    Likes Received:
    0
    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
    Likes Received:
    0
    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. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.