string hostName = System.Net.Dns.GetHostName();
string fff= System.Environment.GetEnvironmentVariable("UserName");
string ff=Request.LogonUserIdentity.Name.Substring(Request.LogonUserIdentity.Name.LastIndexOf(@"\") + 1); string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name; These codes are get the pc user name but i after host to server these codes are get only server pc name not get local pc name.string fff= System.Environment.GetEnvironmentVariable("UserName");the above code i used my local code these is get the local pc name after i host my application this is get the user name of LOCAL PC Computer name not get user name of local PC How to fix it.
string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;