/// <summary> /// 取得用戶端 IP /// </summary> /// <returns>用戶端 IP</returns> public static string GetClientIP() { if (HttpContext.Current != null) { return(HttpContext.Current.Request.UserHostAddress); } else { return(EnvHelper.GetServerIP()); } }
/// <summary> /// 取得用戶端 IP /// </summary> /// <returns>用戶端 IP</returns> public static string GetClientIP() { if (HttpContext.Current != null) { return(HttpContext.Current.Request.UserHostAddress); } else { return(EnvHelper.GetServerIP()); } }