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

C

ckpicker

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!
:)
 
J

John Timney \(Microsoft MVP\)

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
 
K

Kevin Spencer

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top