if(System.Web.HttpContext.Current.Request.ServerVariables["HTTP_VIA"]!=null)
   {
    UserIP = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString();
   }
   else
   {
    UserIP = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
   }
posted on 2008-08-30 00:59  cqsar  阅读(697)  评论(0编辑  收藏  举报