Get Location from IP Adress in c#
How to get the proper location of the client from IP Address using asp.net C# ???
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sunny SharmaPosted Sep 28, 2013, 6:45 AM
Use any web service that offers IP to GeoLocation reverse-address-lookup.
There are many companies out there offering the same. For example I'm using one of the below:
http://ip-api.com/json/173.194.36.82
You just need to make a web request and read the response. For above example request it will produce an xml response like:
-------------------------------------
-------------------------------------
So, now you can easily parse this json and utilize as you want.
Hope it helps :)