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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting username

Status
Not open for further replies.

lwfg

Programmer
Feb 9, 2009
52
US
Response.write(system.environment.username)

shows the username I logged in with on a computer with Visual Studio 2008 on it.

On another that I am trying asp.net on, it shows "NETWORK SERVICE".

I would like to know the simplest way to get the username I logged in with in all cases.

Can that be done?
 
Someone showed me request.servervariables("AUTH_USER") and it worked.
 
HttpContext.Current.User.Identity.Name

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top