This is an archive related to a previous version of Esri Maps for SharePoint. If you need the current version go to

Configure a proxy

In the Silverlight-based ArcGIS Map Web Part, a proxy page can be used to access ArcGIS Server services secured with token-based authentication. A proxy page consists of server-side code that runs on your web server. The browser sends the request to your proxy and your proxy in turn forwards the request to the ArcGIS Server service. Esri Maps for SharePoint provides a proxy page, Proxy.ashx, that you can use to handle communication with the ArcGIS Server services used in your application. Download

The Proxy.ashx page passes along the HTTP referrer from the applications to the server. Typically, you need one proxy page per application if you are using tokens, because tokens are application specific. The scope for which you choose to define tokens (site, page, and so on) depend on the level at which you want to authenticate. If all Map Web Parts within an entire site consume securd ArcGIS Server services in the same way, it may make sense to define one proxy for the site. If various Map Web Parts within a site differ in how they access secured services,set up a proxy for each page or set of pages that use the same permissions.

When retrieving tokens from the Services Directory (for example, http://<servername>/ArcGIS/tokens/gettoken.html), use the entire URL to the SharePoint site or page instead of just http://<hostname>. In the Proxy.config file, paste the entire token without leading or trailing white spaces. Alternatively, use the URL of just the SharePoint site collection to have the proxy work for all site pages. Detailed instructions are in the next section.

Download and configure the proxy page

The following steps describe how to download and install the proxy page on your web server. The proxy page runs on your local web server, not on an Esri server or on the ArcGIS Server computer (unless your web server also hosts the ArcGIS Server instance). The proxy page does not have to be located on your SharePoint server.

Before proceeding, ensure that you have ASP.NET 2.0 or higher installed and registered with IIS. If ASP.NET is not configured with IIS, follow the instructions for the version of IIS you are running in the ASP.NET and IIS Configuration help topic on MSDN.

  1. Download, unzip the file, then save the contents to a folder on your web server's root directory. In IIS, the default location for the web server's root folder is c:\inetpub\wwwroot. If you plan on using the proxy for multiple sites, you can create a folder in the web root directory named proxy and place the contents there.
  2. Open IIS Manager. See How to: Open IIS Manager for more information about opening IIS Manager depending on the version of IIS you are using.
  3. Create a Web Application for the proxy folder; these steps differ depending on the version of IIS you are using.
  4. For IIS 5 or 6 use the following steps:
    1. In the Default Web Site, right-click the proxy directory and click Properties.
    2. On the Directory tab in the Application Settings section, click the Create button and click OK.
      Create IIS application
  5. For IIS 7, use the following steps. For more information, see Create a Website (IIS 7).
    1. In the Default Web Site, right-click the Proxy directory and click Add Application.
      Create IIS7 application
    2. Specify the Alias and Physical Path in the Add Application dialog box, and click OK.
      Add IIS 7 application
  6. Obtain a token for the service. If your application uses multiple ArcGIS Server systems that require tokens, obtain a token for each server. For more information on obtaining a token, see Acquiring ArcGIS Tokens.
  7. Open the configuration proxy page (proxy.config) in a text or XML editor.
  8. For each ArcGIS Server that uses the proxy page, add a <serverUrl> entry to the configuration XML file within the <serverUrls> section. See the proxy configuration file for examples. The serverUrl element can have the following attributes:
    • url—URL of the ArcGIS Server machine or the service. If multiple services in the same server are used in the application, the url attribute can point to the services root. If only a single service on the server is used, the url attribute can be set to the full service URL.
    • matchAll—Specifies whether to use the token for all requests with this URL stem. If this attribute is true and the url attribute is set to the services root, the entry can be used for multiple services in the application.
    • token—Authentication token obtained in step 1. Optional—used only for services secured with token-based authentication.

    If multiple services on the same server are used in the application, the URL can point to the service root (for example,, and the matchAllparameter can be set to true. Multiple server entries can be added if more than one ArcGIS Server computer is used in the application.

    The mustMatch attribute in the containing element controls whether only specified sites can be proxied. This attribute should generally be set to true. If set to false, the proxy page forwards any request to any server. This could potentially allow your proxy page to be used to send requests to third-party servers without your permission.

  9. Save the configuration file. Note the URL of your proxy page, as you will need it when adding a secured map service to Esri Maps for SharePoint.

Once you have configured the proxy page with the application, test the application to ensure requests are processed correctly. The application should function normally as it did before the proxy page was implemented. If not, you may need to troubleshoot the proxy. If your application environment supports debugging mode, you may be able to set a breakpoint in the proxy page and detect whether it is operating correctly.