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!

Retrieve Username

Status
Not open for further replies.

Mike2020

Programmer
Mar 18, 2002
55
US

I created an Intranet website, and I want to retrieve the network user's username/userid when he/she accesses to my website without prompting them the login screen.

I use this line of code in my asp file:

username = request.servervariables("LOGON_USER") or
username = request.servervariables("REMOTE_USER")

But it return nothing.

I wonder what wrong, and do we have other way to get the username/userid.

Thanks.....

Mike
 
open up IIS and go to the properties of the website. Click on the Directory security tab, then click the Edit button under anonymous access. Uncheck the Anonymous access checkbox. That should solve your problem.

Hope this helps,

TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner
 

Thanks

But, I still unable to get the username without login.

Mike
 
correct, if they are not logged on, they don't have a username so LOGON_USER will be empty.

Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Hi, Did you ever make any progress on this?

I think you and I are trying to accomplish the same thing.

Get the NT/WIN2K login Id from via an ASP page.

Thanks.
 
Alex,

Are you having a specific problem with something you are trying to do?

------------------------------------------------------------------------------------------------------------------------
If you don't have a sense of humor, you probably don't have any sense at all.
- Anonymous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top