using System.Collections.Specialized ;
using System.Collections;
public static void Main()
WebClient client = new WebClient();
string destUri = "http://www.webservicex.net/geoipservice.asmx/GetGeoIP";
client.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
NameValueCollection reqparm = new NameValueCollection();
reqparm.Add("IPAddress", "212.199.130.50");
var response = client.UploadValues(destUri,"POST", reqparm);
var x= System.Text.Encoding.UTF8.GetString(response);
var xdoc = XDocument.Load(new StringReader(x));
XNamespace ns = xdoc.Root.GetDefaultNamespace();
xdoc.Root.Element(ns+"CountryName").Value.Dump();