/// <summary>
    /// Send the IP Address of the Client
    /// </summary>
    /// <returns>string</returns>
    public string GetIPAddress()
    {
       
        string sIP = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (String.IsNullOrEmpty(sIP))
        {
            return HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
        }
        else
            return sIP;

    }

Comments (0)