You want the username from the active directory. Try the following code:
string name ="";
using (var context = new PrincipalContext(ContextType.Domain))
{
var usr = UserPrincipal.FindByIdentity(context, User.Identity.Name);
if (usr != null)
name = usr.DisplayName;
}
or this is from social.msdn.microsoft.com :
PrincipalContext ctx = new PrincipalContext(ContextType.Domain);
UserPrincipal user = UserPrincipal.Current;
string displayName = user.DisplayName;
or maybe it:
System.DirectoryServices.AccountManagement.UserPrincipal.Current.DisplayName;
System.DirectoryServices.AccountManagement , : Active Directory (AD DS), Active Directory (AD LDS) Machine SAM (MSAM).