I have used the below code to retrieve the Windows user id of the system.
The code works well in my machine but when I deployed in Server it's not working as expected.
string[] authenticatedUserName;
System.Security.Principal.IPrincipal User;
User = System.Web.HttpContext.Current.User;
if (User.Identity.IsAuthenticated)
{
authenticatedUserName = User.Identity.Name.Split('\\');
string userName = authenticatedUserName[1].ToString();
}
Kindly help me to sort this issue
Go to the complete details ...