/ Published in: C#
Typically won't work if the ASP.Net service identity (in the machine.config ProcessModel section) is a local account.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private string GetUserName() { string retVal = string.Empty; //Pull the username out of the domain\user string. retVal = Page.User.Identity.Name.Split('\\')[1]; retVal = (string)userEntry.Properties["fullname"].Value; return retVal; }