473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

grabbing current username via ADSI?

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
Jul 22 '05 #1
3 2191
"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:OJ**************@TK2MSFTNGP14.phx.gbl...
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.
Jul 22 '05 #2
Use
Function PullUserFullname(strUser)
Dim User
Set User = GetObject("WinNT://<your domain>/" & strUser & ",user")
PullUserFullname = User.Fullname
End Function

from http://www.15seconds.com/issue/020130.htm

HTH
Mike
"Tom Petersen" wrote:
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

Jul 22 '05 #3
On Tue, 18 Jan 2005 07:54:24 -0600, "Tom Petersen"
<pe****@sdsd.sdbor.edu> wrote:
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
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ryan Ritten | last post by:
Anyone know how it is possible for windows to get the name of the user logged in? I know if you do : Request.Servervariables ("AUTH_USER") it displays the username of the person logged in,...
5
by: Joeri KUMBRUCK | last post by:
Hello, I'm trying to create an ASP page where users can type in a username and password, and these credential should be checked with active directory. If username and password are correct, the...
1
by: mike | last post by:
I can think of 3 places where a user's username is stored on their PC: * in the %username% environment variable and * in the Registry. * in at least one WMI class Is there anyway I can get one...
5
by: mvr | last post by:
Hi all How to get the Windows current logged user name using Classic ASP. If no direct way are there any work arounds. Thanks mvr
4
by: Leszek | last post by:
Hello! I have my webpage (ASP) in domain (IIS 6.0). I need to make a popup with fullname of current user. How can I do this? Maybe someone have any examples? Thanks!
5
by: James54321 | last post by:
Hi. I am hoping it is possible to 'grab' the username from when a user enters their username and password to enter a directory ie say I sign in with joe as the username i want the page in that...
3
by: dorrit.Riemenschneider | last post by:
I need to validate a user with username and password against our OpenLDAP active directory. This is my code: Private bool ValidateUser (string username, string password) { DirectoryEntry...
8
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members...
0
by: =?Utf-8?B?QW50b25pbyBPJydOZWFs?= | last post by:
We changed a username in AD. The user now logs on to a computer on our network using the new username without any problems. They can not logon using the old username. However, when they access a...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.