日期:2014-05-17 浏览次数:20440 次
public string IpAddress() { string strIpAddress; strIpAddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (strIpAddress == null) { strIpAddress = Request.ServerVariables["REMOTE_ADDR"]; } return strIpAddress; }