我尝试通过以下代码获取客户端系统的本地ip,但是如果客户端本地ip,此代码仅返回服务器ip和以太网ip?你能帮我如何客户端本地IP吗?
DateTime today = System.DateTime.Now;
string userid = HttpContext.Current.Session["UserId"].ToString();
string hostName = System.Net.Dns.GetHostName();
IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(GetCompCode());
IPAddress[] addr = ipEntry.AddressList;
string ipaddress = addr[addr.Length - 1].ToString();
string SystemName = System.Environment.MachineName;