The method below is used to get the client machine name in MVC 4. I've noticed that for some clients it returns an empty string, any idea why this could happen?
Is there another,more reliable way to get the clients machine name?
private string GetWorkstation()
{
string ip = Request.UserHostName;
IPAddress myIP = IPAddress.Parse(ip);
IPHostEntry GetIPHost = Dns.GetHostEntry(myIP);
List<string> compName = GetIPHost.HostName.ToString().Split('.').ToList();
return compName.First().ToUpper();
}