I’m having a strange issue when trying to debug my app on a device.
var url = "http://maps.googleapis.com/maps/api/geocode/xml?sensor=true&address=";
url += pin.Element("address").Value;
var address = XDocument.Load(url);
That last line gives me this error:
System.Net.WebException: Error: NameResolutionFailure
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00065] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:854
at System.Net.HttpWebRequest.GetResponse () [0x0000e] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:860
...
But it’s only on the actual device. If I run it in the Simulator, it works perfectly.
A
NameResolutionFailuremeans a DNS error, likely because the device does not have internet access, no DNS configured or at least a different configuration (e.g. Wifi, 3G) from the one your Mac (running the simulator) is using.Can you access the internet from your device ? (e.g. airplane mode)
If so can you try to access, on your device from Safari, the
http://maps.googleapis.comsite to see if the DNS servers, configured on your device, can find the host.