jasonhartsoe / geocoding-net

Automatically exported from code.google.com/p/geocoding-net
0 stars 0 forks source link

Authenticated proxy support #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am developing an application that uses your IGeoCoder API. Very handy.

However I am developing it on a network that sits behind an authenticated
proxy server. When executing IGeoCoder.GeoCode() I get a
System.Net.WebException - "The remote server returned an error: (407) Proxy
Authentication Required."

What steps will reproduce the problem?
1. Call IGeoCoder.GeoCode() from behind an authenticated proxy server (I am
using the GoogleGeoCoder implementation)
2. Aw, snap.

What is the expected output? What do you see instead?
I expect an Address[] object back - instead I get a System.Net.WebException.

What version of the product are you using? On what operating system?
http://geocoding-net.googlecode.com/files/geocoding.net_Release_v1.1.0.31.zip

Windows XP / Visual Studio 2008 / ASP.NET 3.5 for development.

Please provide any additional information below.
This should be easy enough to fix, done it in my own applications, but
happy to test any proposed fixes here. Would actually be happy to fix it if
you're pushed for time.

Original issue reported on code.google.com by me%tomfa...@gtempaccount.com on 11 Feb 2010 at 10:27

GoogleCodeExporter commented 8 years ago
You can solve this by adding this to your web.config

<system.net>
     <defaultProxy useDefaultCredentials="true">
         <proxy proxyaddress="http://proxyofyourcompany:port" usesystemdefault="True" />
     </defaultProxy>
</system.net>

Original comment by thomas.v...@cantillana.com on 7 Dec 2010 at 8:31

GoogleCodeExporter commented 8 years ago
This is a patch to support Proxies
At the IGeoCoder level I added a Proxy property, just set that to the 
authenticated proxy and call the GeoCode method

Diff attached 

Original comment by marcosmeli on 11 Jun 2012 at 2:02

Attachments: