62,243
社区成员




public static string GetUserIP()
{
string User_IP;
if (HttpContext.Current.Request.ServerVariables["HTTP_VIA"] != null)
{
User_IP = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString();
}
else
{
User_IP = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
}
return User_IP;
}