Frequently asked question

Why might a non-ESRI service not display successfully in a sample Web API viewer?

Last Published: April 25, 2020


Esri has multiple map viewers available for client side APIs: Flex, Silverlight and JavaScript. These map viewers are reasonably simple, completely free and offer turnkey type solutions. They could be an excellent starting point for users with little to no Web development experience. With some modification, users can add their own map services in these viewers and publish their data over the web relatively quickly.

A common issue for users is that the Esri sample service displays successfully in the sample viewer but not their own map service.

The following checklist highlights the most common reasons for this behavior. This list is designed to be used as a quick reference to provide direction in the troubleshooting process.

Map Service Level
1. Is the referenced Map service valid, started and running?

Tip: Check the status of the Map service by accessing the ArcGIS Services or REST Services directory by using one of the following methods.
• For Microsoft .NET Framework:
Navigate to Windows Start menu > All Programs > ArcGIS > ArcGIS Server.
Follow the URL: http://<serverName>/<agsInstanceName>/REST/services and select <targetService>.

• For Java:
Follow the URL: http://<host>:8399/<agsInstanceName>/REST/Services. Open the ArcGIS JavaScript capability, and verify that the service displays successfully in the JavaScript viewer.

2. Is the URL referenced a REST or a SOAP URL?
• Example REST URL: http://<serverName>/<agsInstanceName>/REST/services/Mapserver/
• Example SOAP URL: http://<serverName>/<agsinstanceName>/services/Mapserver/

Tip: ESRI Web APIs are primarily designed to work with REST endpoints.

3. Is the appropriate layer type being used in the Map service?

Tip: A tiled, or cached, map service can be added as both a tiled and dynamic type. A dynamic, or non-cached, map service can only be added as dynamic type. It will not display if added as a tiled type.

Spatial Reference and Extent Level
1. Is the projection/spatial reference consistent in both the service and the map?

Tip: Map viewers are typically set to use the Web Mercator Auxiliary Sphere coordinate system by default. If the service consumed does not use the same coordinate system as the map viewer, or the first service added to the map, it may not display due to mismatched spatial references.

For testing purposes:
A. Remove all of the existing services.
B. Add only the service that needs to be tested for display.
C. Save the application, follow the steps listed for troubleshooting at the Browser Level (if required), and re-launch the viewer in a new instance of browser.

2. Are the initial extent values, if specified in the source code, appropriate to the service?
Tip: If the map viewer has 'initial extent' and/or 'full extent' values hardcoded in the source code, confirm that these values are appropriate to the spatial reference of the map service being consumed.

For testing purposes:
A. Navigate to ArcGIS Services directory > Target Service > 'Initial and Full Extent' sections.
B. Copy these values and replace the original extent values in source code.
C. Save the application, follow the steps listed for troubleshooting at the Browser Level (if required), and re-launch the viewer in a new instance of browser.

Security Level
1. Does the 'clientaccesspolicy' and\or 'crossdomain' file exist on the root of the ArcGIS Server?

2. Is issue related to security?

Tip: If the service is secured, verify that a valid 'token' is provided for authorization process in the source code. If it is a distributed install, and a firewall is present between the Web server and the ArcGIS Server, verify that the firewall is configured appropriately to enable successful communication between the two servers.

Browser Level
1. Has the REST cache been cleared?
Clearing REST cache and restarting map service after making any changes to the service is typically recommended.

Tip: Refer to the Clear REST Cache (Operation) page on ArcGIS Help.

2. Has the browser cache been cleared and the browser re-launched?

3. Has the map service been tested with different browsers to determine whether or not the observed behavior is browser specific?

Tip: Some behaviors are browser specific; if none of the troubleshooting steps above help, then try using different browsers to rule out this possibility.

Article ID:000011281

  • ArcGIS API for Silverlight Prev
  • ArcGIS API for JavaScript Prev
  • ArcGIS API for Flex Prev

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options