hello guys how r u ?
Q: My question is that, i am currently working on project, in that project i need to get location through IP Address. i wan to do this like, where ever the client using my web app the ip address and the location i get it.
OR
is there any need of using web service kindly tell me that service and url of that also.
so kindly help me about it and reply soon,
Thanks.
Loading

Krishna GaradRank #191 · 12.8K reputationPosted Jun 27, 2011, 11:24 PM EDT
string myExternalIP;
System.Net.HttpWebRequest request =
(System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create("http://www.whatismyip.org");
request.UserAgent = "User-Agent: Mozilla/4.0 (compatible; MSIE" +
"6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
System.Net.HttpWebResponse response =
(System.Net.HttpWebResponse)request.GetResponse();
using (System.IO.StreamReader reader = new
StreamReader(response.GetResponseStream()))
{
myExternalIP = reader.ReadToEnd();
reader.Close();
}
TextBox1.Text = myExternalIP.ToString();
response.Close();
Faisal AnsariRank #3,366 · 427 reputationPosted Jun 27, 2011, 11:33 PM EDT
thanks about that
but my prob is that i want to get location on behalf of this ip address which i get it ..
thanks.
Krishna GaradRank #191 · 12.8K reputationPosted Jun 27, 2011, 11:42 PM EDT
Link1
Link2
Pradeep ChandrakerRank #941 · 2.2K reputationPosted Jun 28, 2011, 7:23 PM EDT
http://www.iplocationtools.com/
http://developergeeks.com/article/44/how-to-get-geolocation-from-ip-address-in-asp-net