WindowsIdentity user = (WindowsIdentity)HttpContext.Current.User.Identity; string userName = user.Name; if (!string.IsNullOrEmpty(userName)) { string userDomain = userName.Substring(0, userName.IndexOf(@"\")).ToLower(); userAlias = userName.Substring(userName.IndexOf(@"\") + 1).ToLower(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)