I have seen many questions and answer on stackoverflow regarding how to fetch geolocation of an IP address in asp.net but..
How can I fetch the IP address location in winforms ?
I am working on the C# winform application and I need to show user ,its ip address and Its location. I am able to show user's Local,External IP address but I could not find any way to show Location.
Any body knows if I can do this with any WebRequest
or any other solution ?
Edit: I am able to accomplish the task by following method.
Send IP address to a site which shows location from the IP address.(e.g. www.whatismyipaddress.com)
fetching its source code.
parsing its code and use
string
operations to get the location.
But I know It is not good approach as if website is down or moved or any change in the source code will make my code useless.