Assume there is Active Directory domain: "chiled.root.f1dm.com"
Netbios name: "CHILED1F1"
Given this code:
if (HttpContext.Current == null || HttpContext.Current.User == null ||
!HttpContext.Current.User.Identity.IsAuthenticated)
{
throw new MyException(WRONG_USERNAME_OR_PASSWORD_ERROR_CODE, WRONG_USERNAME_OR_PASSWORD_ERROR_MESSAGE);
}
I'm looking for a way to reach from the HttpContext the user's Fully qualified domain name (FQDN). Currently I'm getting from the context the user's domain in the Netbios form (Like: CHILED1F1\user_name) but I need this: chiled.root.f1dm.com\user_name
I there a way to do it? I need it for the Windows current user only (So the Machine's domain name will not help me). Thanks!