grabbing current username via ADSI?

T

Tom Petersen

My users logon to the Patriot domain, my intranet is on sdsddata01 server.
I have a form that people have to click on a dropdown list to pick their
name from the list when submitting a form. Is there any way to grab their
username via ADSI so I can query it against a database that will get
submitted against a form. I have seen a few arcticles regarding this but I
couldn't make sense of them. They are already authenticating when they
login, so I don't want them to have to do it again once they hit the
intranet. Is this possible using ADSI? Will I have to make some permission
changes in IIS as well?

TIA!
Tom
 
T

Tom Kaminski [MVP]

Tom Petersen said:
My users logon to the Patriot domain, my intranet is on sdsddata01 server.
I have a form that people have to click on a dropdown list to pick their
name from the list when submitting a form. Is there any way to grab their
username via ADSI so I can query it against a database that will get
submitted against a form. I have seen a few arcticles regarding this but I
couldn't make sense of them. They are already authenticating when they
login, so I don't want them to have to do it again once they hit the
intranet. Is this possible using ADSI? Will I have to make some permission
changes in IIS as well?

In ASP, Request.ServerVariables("LOGON_USER") captures the username as long
as you have denied anonymous access.
 
J

Jeff Cochran

My users logon to the Patriot domain, my intranet is on sdsddata01 server.
I have a form that people have to click on a dropdown list to pick their
name from the list when submitting a form. Is there any way to grab their
username via ADSI so I can query it against a database that will get
submitted against a form. I have seen a few arcticles regarding this but I
couldn't make sense of them. They are already authenticating when they
login, so I don't want them to have to do it again once they hit the
intranet. Is this possible using ADSI?

Yes, but easier using just ASP and Request.ServerVariables.
Will I have to make some permission
changes in IIS as well?

You have to turn off Anonymous access, otherwise the user won't
authenticate using Windows credentials for you to retrieve.

Jeff
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top