Get IP geolocation using C# & WPF
问题 I am doing a module which can display my city, state, latitude and longitude, using IP address of the device I am using. However, I can't get it right. Below, there is my code which I referred to another website: internal GeoLoc GetMyGeoLocation() { try { //create a request to geoiptool.com var request = WebRequest.Create(new Uri("http://geoiptool.com/data.php")) as HttpWebRequest; if (request != null) { //set the request user agent request.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0;