我无法获取客户端IP地址,而是在服务器上的运行时获取了本地IP地址
问题描述:
我的代码如下:
my code is below:
string myHost = System.Net.Dns.GetHostName();
System.Net.IPHostEntry myIPs = System.Net.Dns.GetHostEntry(myHost);
foreach (System.Net.IPAddress myIP in myIPs.AddressList)
{
TextBox1.Text = myIP.ToString();
}
在此先感谢.......
Thanks in advance.......