Getting the authenticated user’s name when using Windows Authentication with ASP.NET is very simple. I just keep having to go back to Google or dig out an old project to remember it, so here it is:
string username = User.Identity.Name.ToString();
Be sure to add the Security reference:
[UPDATE] Check out the comments below for some additional suggestions on getting the user name without the Domain name.