我已经尝试过
System.Net.Dns.GetHostEntry(HttpContext.Connection.RemoteIpAddress.ToString()).ToString();
但是那并没有起作用。 我还尝试了使用。
PCName = Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName;
但是这似乎已经被弃用了Core。
我已经尝试过
System.Net.Dns.GetHostEntry(HttpContext.Connection.RemoteIpAddress.ToString()).ToString();
PCName = Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName;