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!

Getting the USER ID of the user

Status
Not open for further replies.

joebickley

Programmer
Aug 28, 2001
139
GB
Hi

Im trying to capture the name of the USER logon on to his/her machine when hiting a page. I think i need to use the <%= Request.ServerVariables(&quot;XXXXXX&quot;)%> command but i dont know what to request.

I have tried these:
AUTH_USER - returns nothing
remote_addr - returns IP address

Any ideas?

Thanks

Joe
 
Joe,

Try Request.ServerVariables(&quot;REMOTE_USER&quot;) - I had a few problems when trying to pick up user NT accounts and this was the only one that worked!

Regards,

Ben
 
Gidday,

I have been looking at this exact same thing and I found that even if you have logged into the server on a previous page, the page that has LOGON_USER or such must have Basic or NT challenge response security.

I too got no result for REMOTE_USER until I set this flag on my test page.

Hope this helps.

Cheers

Mark
 
The remote_user, logon_user, etc. never work when anonymous access is enabled. You have to enable NT Challenge/response authentication to use these server variables. However, as long as the users that visit your page are authenticated users on the domain, they won't get any logon popups (unless you specify additional restrictions on the asp pages by using NTFS permissions). So this should only be used on an intranet (but I guess this is what you're doing).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top