HttpContext.Current.Request.UserHostAddress
------------------------------------------------------------------------------------------------
通过代理,获取真实的ip
if(Context.Request.ServerVariables["HTTP_VIA"]!=null)
{
ip=Context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString();
}
else
{
ip=Context.Request.ServerVariables["REMOTE_ADDR"].ToString();
}