Example #1
0
        public string GetClientIpAddress()
        {
            #region 获取客户端真实的IP地址
            GetClientIpAddress getClientIpAddress = new GetClientIpAddress(_httpContextAccessor);
            return(getClientIpAddress.UserClientIpAddress);

            #endregion
        }
Example #2
0
        /// <summary>
        /// 获取用户IP地址
        /// </summary>
        /// <returns></returns>
        public string GetClientIpAddress()
        {
            GetClientIpAddress getClientIpAddress = new GetClientIpAddress(_httpContextAccessor);

            return(getClientIpAddress.UserClientIpAddress);
        }