C# 获取客户端IP
摘要:
public string GetClientIP() { string sUserIP = string.Empty; if (Request.ServerVariables["HTTP_VIA"] != null) { // 穿过代理服务器取远程用户真实IP地址 sUserIP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString(); if (string.IsNullOrEmpty(sUserIP)) sUserIP = HttpContext.Current.Request.Use 阅读全文
posted @ 2012-03-01 16:10 bicabo 阅读(425) 评论(0) 推荐(0) 编辑