Bilal Haider
Bilal Haider

Reputation: 81

Geolocating IP Address in C#

I am developing an windows 8 app in C# And want to get Geo Coordinates of IP addresses or Want an API that can exactly or nearly geolocate the IP address in windows 8 app! Thanks in advance for your help!

Upvotes: 3

Views: 9110

Answers (2)

Dreamwalker
Dreamwalker

Reputation: 3035

Just use a web service here is free one 10000 requests per hour

http://freegeoip.net/static/index.html

REST Call http://freegeoip.net/xml/[your ip]

EDIT

Simple code to download from a url

using (var objClient = new System.Net.WebClient())
{
    var strFile = objClient.DownloadString("http://freegeoip.net/xml/192.168.0.1");
}

Upvotes: 14

CodeCaster
CodeCaster

Reputation: 151594

If you type your question in any web search engine, this page is bound to come up: Windows 8 Geolocation sample in C#, VB.NET, C++, JavaScript for Visual Studio 2012. Download it, look at it, I'm sure it's helpful.

Upvotes: -1

Related Questions