Fetch visitors Country details based on Ip address Problem

Posted by Gopal_nivas under ASP.NET on 7/18/2011 | Points: 10 | Views : 1819 | Status : [Member] | Replies : 0
i want to get visitors ip address and based on the ip address i want to get country details of the visitors.

i will get users ip address and by passing the ip address to a method i am facing the problem.

i was using the below url in order to retrieve the country deatils

but normally i goes to this url . it thorws the following message
"App Engine Error
Over Quota
This Google App Engine application is temporarily over its serving quota. Please try again later."

so how to handle this.
i have to get the country details based on the ip address.

so please provide me some help regarding this issue.

Fetch country based on ip address code is below:

private DataTable GetGeoLocation(string ipaddress)
//Create a WebRequest
WebRequest rssReq = WebRequest.Create("http://freegeoip.appspot.com/xml/"
+ ipaddress);
//Create a Proxy
WebProxy px = new WebProxy("http://freegeoip.appspot.com/xml/" + ipaddress, true);

//Assign the proxy to the WebRequest
rssReq.Proxy = px;

//Set the timeout in Seconds for the WebRequest
rssReq.Timeout = 2000;
{ //Get the WebResponse
WebResponse rep = rssReq.GetResponse();

//Read the Response in a XMLTextReader
XmlTextReader xtr = new XmlTextReader(rep.GetResponseStream());

//Create a new DataSet
DataSet ds = new DataSet();

//Read the Response into the DataSet
return ds.Tables[0];
return null;

it returns only "null" due to that url not opening .



(No response found.)

Login to post response