Tutorial: Publishing a map service

In this topic

Complexity: BeginnerData Requirement: Use your own dataGoal: Publish a map service to ArcGIS Server and consume it over the web using Map Viewer.

This tutorial gives you the steps for publishing a map service to ArcGIS Server using ArcMap. A map service is the way that you make maps, features, and attribute data available to the web using ArcGIS. If you're new to map services and want to learn more about them before attempting this tutorial, see map services.

Before beginning this tutorial

If you've just installed ArcGIS Server, you need to complete some
preparatory steps before you can connect to the server and publish services:

For the Server URL, type the URL of the ArcGIS Server site you want to connect to. For example, http://gisserver.domain.com:6080/arcgis.

From the Server Type drop-down list, choose ArcGIS Server.

During the publishing process, a service definition file is created and temporarily stored locally on disk. When the publishing process completes, the service definition is uploaded to the server and the local file is deleted. For the purposes of this tutorial, accept the default staging folder and continue.

Optionally, in the Publish a Service window, enter a new name for the service. The name cannot be more than 120 characters long and may contain only alphanumeric characters and underscores. Click Next.

By default, services are published to the root folder (root) of ArcGIS Server. Services can be organized into subfolders under the root folder. Choose the folder where you want to publish the service, or create a new folder to contain the service. Click Continue.

The Service Editor displays. You'll use the Service Editor to choose what users can do with your map service and take fine-grained control of how the server will expose your service. Click the Capabilities tab.

By default, mapping and KML are enabled. Click Mapping and review the following properties:

URL—This is the URL clients use to access the map service. The URL will be formatted as follows: http://gisserver.domain.com:6080/arcgis/services/folder/service/MapServer.

Data—Selecting this option allows client applications to perform attribute searches on the features in your map service.

Query—Selecting this option allows client applications to query the features in your map service.

Click Analyze. This examines your map document to see if it can be published to the server.

Tip:

To give yourself more viewing area when configuring your map service, click the Collapse button at the top of the Service Editor.

Fix any Errors in the Prepare window; this must be done before you can publish. Optionally, you can fix the warnings and informational messages to further improve the performance and appearance of your map service. For more information about resolving these issues, see Analyzing your GIS resource.

Note:

You can register folders and geodatabases with your ArcGIS Server site, thus ensuring that the server can recognize and use your data. If you proceed with the following steps, any data referenced by your map document originating from an unregistered folder or geodatabase will be copied to the server at the time that you publish. This is a precautionary measure to ensure that the server can access all the data used by the service. For full instructions on registering a folder or geodatabase with your ArcGIS Server site, see Registering your data with ArcGIS Server using ArcGIS Desktop.

Optionally, in the Service Editor, click Preview. This can give you an idea of how your map will look when viewed on the web. See Previewing your map for more information.

Once you've fixed the errors in your map document, click Publish.

Your map service is published to ArcGIS Server. When the publishing process completes, you are ready to consume your map service in a web map.

Consume the map service in a web map

In this section of the tutorial, you'll use Map Viewer to view and interact with your map service on the web. Map Viewer is hosted on
ArcGIS.com and is
deployable directly through the ArcGIS Server Services Directory. It
does not require any configuration or programming work to get Map Viewer up and
running.

Note:

In this section you will simply visualize your published service with a readily available basemap from ArcGIS Online. In order to save and share your service within a web map or web application, you will need to sign in with an organizational or named user account. For more information, see the About creating web GIS applications topic.

Open a web browser and navigate to the ArcGIS Server Services Directory. Typically, this is located at http://gisserver.domain.com:6080/arcgis/rest/services. You can also access the Services Directory by opening the shortcut installed with ArcGIS Server.

In the services list, click the name of your map service. Typically, this is displayed as <map service name> (MapServer). If you don't see your map service, it may be located within one of the folders listed in the Services Directory.

The ArcGIS API for JavaScript offers the most advanced web mapping capabilities and customization options. If you're comfortable programming using this API, you can create a rich experience for your users on the web by utilizing a map service identical to the one you created in this tutorial.

By exploring one or all of the ArcGIS clients listed above, you give yourself additional options that can help you tailor your web mapping scenario for a specific purpose, goal, or organizational strategy.