Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Querying AD for a user's log-in name...

Reply
Thread Tools

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

 
 
ckpicker
Guest
Posts: n/a
 
      05-18-2004
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!


 
Reply With Quote
 
 
 
 
John Timney \(Microsoft MVP\)
Guest
Posts: n/a
 
      05-18-2004
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" <(E-Mail Removed)-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!
>
>



 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      05-18-2004
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" <(E-Mail Removed)-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!
>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      05-19-2004
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" <(E-Mail Removed)-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!
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
querying data from a dataset? MDB ASP .Net 3 05-17-2004 09:42 PM
problems querying/setting speed/duplex on WS-C3550 via SNMP Bruce Campbell Cisco 0 04-03-2004 02:16 PM
querying for user ip... =?Utf-8?B?c21lbg==?= ASP .Net 1 03-06-2004 02:40 PM
advice on querying DB Mark ASP .Net 1 01-14-2004 02:26 PM
querying a DB and returning Id's - HELP PLEASE Mark ASP .Net 0 01-13-2004 11:15 PM



Advertisments