Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grabbing NT User Name 1

Status
Not open for further replies.

Gatorajc

MIS
Mar 1, 2002
423
US
I have a slight problem and not sure if is the code or the settings in IIS. I want to grab the NT User Name but it keeps coming back blank.

logon = Request.ServerVariables("LOGON_USER")
Response.write logon.

I am using IIS 4.

I took off the Anonymous Access and tried using Basic Authentication that prompted for a log in but did not grab the User Name. (Now Prompting for a login is not what is requested so that will not work for this project.)

I also tried Windows NT Challenge/Response with no result at all.

Together also gets no result.

On the Web Server, I also tried to log in locally and on the domain, didn't think it would matter but I am trying anything.

I have not changed anything on the browser thinking that would have nothing to do with it. So it does have something to do with it please advise.

Thank you in advance.

AJ
I would lose my head if it wasn't attached. [roll1]
 
Try this,

logon = Request.ServerVariables("AUTH_USER")
Response.Write logon.

I guess this will only work with Basic Authentication and
Windows NT Challenge/Response .

I have used this in the past and it worked well.

Good Luck
Oysterbar ride to success. Keep Riding
 
Thanks Larryman I got it to work already user error but your answer does work. AJ
I would lose my head if it wasn't attached. [roll1]
 
for anyone else hitting this thread.. this is what I use on our intranet, where IIS has already forced them to authenticate using their NT password, my ASP pages can "sniff them out" using the follwing line of code


thelogin = Request.ServerVariables ("REMOTE_USER")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top