Querying AD for a user's log-in name...

Discussion in 'ASP .Net' started by ckpicker, May 18, 2004.

  1. ckpicker

    ckpicker Guest

    Is it possible to retrieve a user's log-in name from AD when they
    visit a particular website? I'm wanting to store exactly who clicked
    on certain links and when they clicked them. Is this possible? I
    know very little about AD, so any help would be appreciated. Thanks!
    :)
     
    ckpicker, May 18, 2004
    #1
    1. Advertising

  2. When you are not using anonymous credentials, the username is passed in the
    server variables collection when it is known.

    It is normally passed by the browser using passthrough authentication (ntlm)
    or basic authentication or an authentication challenge (403 response) is
    issued and the user needs to provide valid credentials. It is then checked
    behind the scenes by IIS for authentication and if succesful the server
    variables collection should now contain the username.

    You dont have to talk directly to AD from your code, and what they clicked
    will be in the webserver logs.

    --
    Regards

    John Timney
    Microsoft Regional Director
    Microsoft MVP


    "ckpicker" <-spam.invalid> wrote in message
    news:40aa87e2_1@127.0.0.1...
    > Is it possible to retrieve a user's log-in name from AD when they
    > visit a particular website? I'm wanting to store exactly who clicked
    > on certain links and when they clicked them. Is this possible? I
    > know very little about AD, so any help would be appreciated. Thanks!
    > :)
    >
     
    John Timney \(Microsoft MVP\), May 18, 2004
    #2
    1. Advertising

  3. Try Request.ServerVariables("LOGON_USER").

    Note that it may not work consistently if you allow anonymous users in IIS.
    Here's more info:
    http://www.4guysfromrolla.com/webtech/092298-3.shtml

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "ckpicker" <-spam.invalid> wrote in message
    news:40aa87e2_1@127.0.0.1...
    > Is it possible to retrieve a user's log-in name from AD when they
    > visit a particular website? I'm wanting to store exactly who clicked
    > on certain links and when they clicked them. Is this possible? I
    > know very little about AD, so any help would be appreciated. Thanks!
    > :)
    >
     
    Steve C. Orr [MVP, MCSD], May 18, 2004
    #3
  4. Yes, it is possible. However, it is not necessary. As you already know their
    login name (passed by the browser with authentication), you already have a
    unique identifier for that user which you can use to store information
    specific to that user in the database. Fetching more infomation about them
    from Active Directory should not be necessary if all you are doing is
    tracking them.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "ckpicker" <-spam.invalid> wrote in message
    news:40aa87e2_1@127.0.0.1...
    > Is it possible to retrieve a user's log-in name from AD when they
    > visit a particular website? I'm wanting to store exactly who clicked
    > on certain links and when they clicked them. Is this possible? I
    > know very little about AD, so any help would be appreciated. Thanks!
    > :)
    >
     
    Kevin Spencer, May 19, 2004
    #4
    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. =?Utf-8?B?c21lbg==?=

    querying for user ip...

    =?Utf-8?B?c21lbg==?=, Mar 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    313
  2. nalbayo
    Replies:
    2
    Views:
    5,534
    Bruce Barker
    Nov 11, 2005
  3. Hakan Akkas
    Replies:
    1
    Views:
    521
    Joris Gillis
    Nov 16, 2004
  4. Benjamin Goldenberg

    Querying Graphics Card Name

    Benjamin Goldenberg, Aug 9, 2007, in forum: Python
    Replies:
    6
    Views:
    341
    Benjamin Goldenberg
    Aug 13, 2007
  5. fu
    Replies:
    3
    Views:
    266
    David Mullet
    Jul 11, 2007
Loading...

Share This Page