My webservice makes a request to maps.google.com but returns exception System.Net.WebException with 403 Forbidden message
But the URL usually runs via browser. What can it be?
[WebMethod]
public string teste()
{
string url = @"http://maps.google.com/maps/api/directions/xml?origin=-28.2773357297022,-52.7852053516473&destination=-19.7779008,-47.9249145&mode=driving&waypoints=-26.8727562,-49.1010188|-25.530283,-49.2949339|-23.4841434977362,-46.7853496799363|&sensor=false&client=gme-meuID&signature=G3GSye-fxYY-GIDq-z2TIO8FI2A=";
HttpWebRequest _HttpReq = (HttpWebRequest)WebRequest.Create(url);
_HttpReq.Method = "GET";
var response = _HttpReq.GetResponse();
StreamReader sReader = new StreamReader(response.GetResponseStream());
return sReader.ReadToEnd();
}