Hi
In a MVC web application, I need to display a disclaimer if client's IP is outside certain IP range. I was wondering if it is possible to get client IP address? I know there are some paid services that provide IP address of the client using AJAX calls. Is there
any free solution out there?
Joe
In a MVC web application, I need to display a disclaimer if client's IP is outside certain IP range. I was wondering if it is possible to get client IP address? I know there are some paid services that provide IP address of the client using AJAX calls. Is there
any free solution out there?
It is not possible to get the client's actual IP. You can get the client's gateway IP.
Member
61 Points
460 Posts
Get client IP address
Dec 09, 2019 11:42 AM|joegreen2005|LINK
Hi
In a MVC web application, I need to display a disclaimer if client's IP is outside certain IP range. I was wondering if it is possible to get client IP address? I know there are some paid services that provide IP address of the client using AJAX calls. Is there any free solution out there?
Joe
All-Star
53741 Points
24068 Posts
Re: Get client IP address
Dec 09, 2019 12:25 PM|mgebhard|LINK
It is not possible to get the client's actual IP. You can get the client's gateway IP.
https://stackoverflow.com/questions/2577496/how-can-i-get-the-clients-ip-address-in-asp-net-mvc
https://www.aspsnippets.com/Articles/How-to-get-Client-IP-Address-of-Visitors-Machine-in-ASPNet-MVC.aspx