Code

C#.NET Helper to Get Client IP and Country

C#.NET Helper to Get Client IP and Country

This is a C # .NET service class for use in Web projects. It allows to know the public IP of the client, and to determine to which country it belongs.

Config: Please add the following keys in the appSettings section (Web.Config) <add key=”GeoIPCountryWhoisData” value=”D:\Projects\Library\GeoIpHelper\” /> <add key=”RemoteUri” value=”http://geolite.maxmind.com/download/geoip/database/” />

Methods: GetIPAddress: It allows to know the public IP of the client GetLand: Allows you to determine to which country a public IP belongs UpdateDataBase: Updates the IP data base

by
by
by
by
by
by