|Problem getting geocodes from .NET||StephenR||9/24/08 5:49 AM|
I am using the Google Maps API in an ASP.NET web application and am
running into some problems. I want to be able to get geocode
information for addresses in a C# library that is called from my web
app. I construct the correct URL using my API key and the address
details, but I get a WebException saying "(407) Proxy Authentication
Required" when trying to request the URL using a WebClient instance.
I know the key works and the URL is correct because if I paste the
same URL into a browser window it works and returns the correct XML. I
am running using the ASP.NET development server, so my key is
registered for http://localhost which I believe is correct. I have
tried keys with the port number included and the IP address
(127.0.0.1) but it still gives the error. I don't understand why this
is not working - can anybody help?
|Re: Problem getting geocodes from .NET||barryhunter||9/24/08 7:26 AM|
|Re: Problem getting geocodes from .NET||Lawrence||9/24/08 7:41 AM|
I am using this one with no problem and I think it is a very good
|Re: Problem getting geocodes from .NET||StephenR||9/25/08 3:31 AM|
THANK YOU! It seems obvious now but of course the reason it was
working in the browser is because the proxy server was setup in the
connection settings. To get it working in my code I just had to add
our proxy server address to the config file and then add the following
after the WebClient construction:
client.Proxy = new
client.Proxy.Credentials = CredentialCache.DefaultCredentials;
It now works a treat. Many thanks.
On Sep 24, 3:26 pm, "Barry Hunter" <barrybhun...@googlemail.com>
> > "(407) Proxy Authentication Required"
> <Stephen.Martin.Robe...@gmail.com> wrote:> > registered forhttp://localhostwhich I believe is correct. I have
> > tried keys with the port number included and the IP address> -www.nearby.org.uk-www.geograph.org.uk-- Hide quoted text -
> - Show quoted text -