Appendix C. Configuring a proxy

 

Using a proxy configuration to access secured services in a browser-based application is optional. You could continue developing the application by requiring a user to log in each time, and the application would still work as expected.

Sometimes you might want to be more lax about security requirements. For example, suppose a handful of users have access to the application—only from within an internal network. You might consider using a proxy page so users don’t have to enter their usernames and passwords in the Identity Manager each time the application loads.

Although I encourage you to set up users with their own passwords on your internal ArcGIS Server or via your organization’s ArcGIS Online account, this appendix covers the details of using the ASP.NET proxy page provided by Esri (https://developers.arcgis.com/javascript/jshelp/ags_proxy.html). You complete similar steps to set up the application for other proxy pages provided by Esri.

C.1. Setting up the proxy page

Regardless of the proxy page you use (ASP.NET, PHP, or JSP), setting it up involves the same easy process. If using a secured ArcGIS Server service, you can place your username and password in the configuration file for the proxy. In the case of the ASP.NET page, it may look like this:

<serverUrl url="http://services1.arcgis.com/"
    matchAll="true"
    username="<USERNAME>"
    password="<PASSWORD>">
</serverUrl>

C.2. Using the proxy in your application