取得请求者的IP地址
1. ip=Request.ServerVariables["REMOTE_HOST"];
2. return HttpContext.Current.Request.UserHostAddress;
取得本地ip
System.Net.IPAddress addr;
addr = new System.Net.IPAddress(System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName()).AddressList[0].Address);