I have one URL "http://mt0.google.com/vt/lyrs=m@129&hl=en&x=11728&y=7595&z=14&s=Galileo"
used to fetch Google Tiles from Internet. If I use this Google Tile URL from browser (any), I successfully get the Google Tiles (Map). But the problem is, if I try to access this URL programmaticaly, I get an Error: HTTP 403 Forbidden Error.
What could be the problem? Do I need to do some kind of setting in my program?
My code to access the URL is as follows:
byte[] imageBuffer = null;
try
{
WebClient client = new WebClient();
// It's a sample URL to get Tile from Google as on 29-06-2010
string url = "http://mt0.google.com/vt/lyrs=m@129&hl=en&x=11728&y=7595&z=14&s=Galileo";
imageBuffer = client.DownloadData(new Uri(url));
}
catch (WebException we)
{
Debug.Print(we.Message);
return null;
}
return imageBuffer;
Here, in catch block I get an Exception of HTTP 403: Forbidden Error