Adding secured services
ArcGIS Viewer for Silverlight allows you to add secure services from ArcGIS for Server and ArcGIS Online using two authentication methods. You can access secure services using a user name and password (token-based authentication) or a proxy. When using a user name and password, the Viewer allows you to sign into multiple ArcGIS Servers using one or more accounts.
Add secure services with a user name and password
When browsing to add layers to the map, you can easily sign in to access secure services. When you sign in, the Viewer will automatically use the credentials specified to authenticate against the specified ArcGIS Server endpoint. Then all the services that the specified user account has access to will be shown in the Browse panel.
Specific steps for accessing secure services using this approach are provided below.
- Click the Browse button on the Map tab to open the Browse panel. Enter the URL to the desired service. If you have entered a URL to an ArcGIS for Server instance that contains secure services, you will see a link on the Browse panel sign into those secure services:
Note:
For further information on browsing to services, refer to the Browsing ArcGIS Server topic.
- Click the Sign in to access secure services link. You will be prompted to sign in:
- Specify your user name and password and click Sign In. If the log-in is accepted, the Browse panel will refresh and the all the services that the specified account has access to will be shown.
- In the Browse panel, select the desired service or layer and click Add Selected Layer.
You can also sign into ArcGIS Server or ArcGIS Online independently of the Browse panel. If you sign in using this approach, services that can be accessed with the specified account will be displayed in the Browse panel without needing to sign in again. Note that,
The steps below describe how to sign in using this approach.
- In the Application Builder, click the Sign In link in the upper right corner of the Application Builder. A drop-down list appears with options to sign in to ArcGIS Online and ArcGIS Server. Once you have signed in to ArcGIS Online or ArcGIS Server, you will see an additional option to Sign Out.
Tip:
If you sign in to one service endpoint (e.g. http://serverA/arcgis/rest/services) with a user name and password that is also valid for another service endpoint (e.g. http://serverB/arcgis/rest/services), you will not have to sign in again when connecting to the second service endpoint. The application will automatically use the account you specified.
- Click one of the sign in links. A dialog box will appear prompting you to enter your credentials. Type your user name and password. If you are accessing an ArcGIS Server endpoint, also type the URL of the ArcGIS Server that you wish to connect to. Then click Sign In.
- ArcGIS Online Sign In dialog box:
Tip:
The URL of the ArcGIS Online or Portal for ArcGIS endpoint to sign in to is specified on the Settings page. For further information, see the Application Builder Settings help topic.
- ArcGIS Server Sign In dialog box:
- ArcGIS Online Sign In dialog box:
- Once you have signed in, you can use the Browse panel to add secure services from the endpoint that you have signed in to.
Tip:
To add ArcGIS Online hosted services, you must specify the full URL to the map service or layer within the service that you wish to add (e.g. http://tiles.arcgis.com/tiles/abCdefGhIJKlMNo1/arcgis/rest/services/MyHostedService/MapServer). You can find this URL under the Map Contents heading on the item's page in ArcGIS Online.
Add secure map services using a proxy
Secured map services can be added to ArcGIS Viewer for Silverlight via a proxy URL. Web requests are redirected through the proxy, which is responsible for authenticating with the service endpoint. Once you have configured your proxy pages as shown in the Configuring a proxy topic, you can access secured services. To use the proxy in your application, follow the steps below.
- In the Application Builder, click the Settings link in the upper right corner.
- Click the Application Settings tab.
Note:
For more information about configuring settings in the Application Builder, refer to Application Builder Settings.
- Type the URL to the proxy page in the Proxy text box under the Current Application Settings heading. The proxy will be shared by all layers in the application that use a secured service.
Tip:
To specify a default proxy for all new applications, enter a proxy URL into the Proxy text box under the Default Settings heading.
- Close the settings page by clicking the back button in the upper right corner.
- In the Browse panel, check the Use Proxy check box. Then browse to the service you wish to add (for further information see the Browsing ArcGIS Server topic). All of the layers you add will use the defined proxy.

Make sure to add a layer using a proxy only when required. All layers added while Use Proxy is checked will have requests for their data routed through the proxy server.