/// <summary>
///
获取客户端真实IP,非代理地址
/// </summary>
/// <returns></returns>
public string GetUserIP()
{
string userIP = string.Empty;
if (Request.ServerVariables["
HTTP_VIA"] == null)
{
userIP = Request.UserHostAddress;
}
else
{
userIP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
}
return userIP;
}