Exemple #1
0
        public string ResolveIp(HttpRequest httpRequest)
        {
            IPAddress clientIp = null;


            if (!string.IsNullOrEmpty(httpRequest.Header[_headerName]))
            {
                clientIp = IpAddressUtil.ParseIp(httpRequest.Header[_headerName]);
            }

            return(clientIp?.ToString());
        }
Exemple #2
0
 public static IPAddress ParseIp(string ipAddress)
 {
     return(IpAddressUtil.ParseIp(ipAddress));
 }