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

Getting Domain User Name

Status
Not open for further replies.

MikeDamone

Programmer
Oct 21, 2003
106
US
Hi all,

I have internal web app and I would like to be able to retrieve the user name of user who is logged into the domain when they hit my page. I know I can do this by setting directory security to Integrated Windows in IIS, but I don't want them to have to log in. Is there another way to do it? Thanks
 
C# Request.ServerVariables["Logon_User"]
VB Request.ServerVariables("Logon_User")

or

C# string username = Context.User.Identity.Name;
VB Dim username AS String = Context.User.Identity.Name;

You'll still need to write a little function to strip off the domain name and slash.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top