Connecting to services through a proxy server

Some organizations use proxy servers to filter outgoing requests to the Internet and anonymize requests from machines inside the network firewalls. This topic describes what to do if your Web application needs to connect to a GIS server through a proxy server. The application could be ArcGIS Server Manager, a template application built with Manager or Visual Studio, or a custom application that uses Web ADF components. The services you connect to might be map services for visualization, or they could be services that support tasks in your application, such as geocode and geoprocessing services.

If your application will be connecting to a GIS server outside your network and your network uses a proxy server, you must do the following. These steps modify the XML file ProxyServer.config that is installed with the Web ADF and contains your proxy server settings.

Steps:
  1. Navigate to <ArcGIS install directory>\DotNet\ProxyServer.config and open the file in a text or XML editor.
  2. Set the Enabled property to true.
  3. Set the ProxyServerUri to the address of your proxy server. For example: http://proxytest.mydomain.com:8080.
  4. If your proxy server requires authentication, as many proxy servers do, change ProxyRequiresAuthentication to true. Then set Identity Encrypted = "true" and enter the encrypted identity in the Identity tag. For example:

    <Identity Encrypted="true">+eH+xLVYZ+qmI+7hEUIpEf1LqlRzNmlo</Identity>

    To get the encrypted identity, you can run a tool that comes with the Web ADF. Open a command prompt and type the following, substituting your own user name and password:

    %adfutil.exe -i username;password

    You can include a domain in the user name. For example, you might type the following:

    %adfutil.exe -i mydomain\bob2008;secretpassword

    A message box appears with the encrypted identity, which you can then paste in the Identity tag of the ProxyServer.config file as described above.

    You aren't required to encrypt the identity, but it is a good security practice. If you don't encrypt the identity, just enter the user name and password separated by a semicolon (;).

  5. Save your changes to ProxyServer.config and restart the Web server.
NoteNote:

ProxyServer.config contains two properties not mentioned above:

  • If BypassProxyOnLocal is set to true, Web requests to the local server will bypass the proxy. True is the default value.
  • BypassAddressList contains a semicolon-delimited list of URLs that will bypass the proxy. If a URL starts with an entry in this list, the request bypasses the proxy and makes a direct connection.

3/6/2013