Publishing a service in ArcGIS for Server
We have our interface and architecture, now we need to publish our Bestaurants database in ArcGIS for Server. We just completed setting up ArcGIS for Server and Desktop. You must have ArcGIS for Desktop and ArcGIS for Server installed, configured, and ready for use to be able to perform this exercise.
Tip
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/ and register to have the files e-mailed directly to you.
We need to get the supporting files for this chapter: 2955OT_01_Files
. This file can be downloaded from www.packtpub.com. Copy this folder to the ARCGISMACHINE
machine. Follow these steps to publish the service on ArcGIS for Server.
- Log in to the machine with the administrator account.
- Go to the root
C:
drive and create a new folder named2955OT
. Copy the folder named2955OT_01_Files
from the code bundle to the2955OT
folder. - Open the
2955OT_01_Files
folder and double-click on theMXD
fileBelize.mxd
. This will open ArcMap, which will allow us to view the Bestaurants restaurants data on ArcGIS for Desktop.Note
The
MXD
file or the map document file is what you get when you save a map in ArcMap. It contains basic configuration, extent, symbologies, and legends. - When ArcMap opens, you should see the data as shown in the following screenshot:
- From the File menu, point to Share As and then click on Service ….
- Select Publish a Service and click on Next.
- From the Choose a connection drop-down list, click on Create New Connection icon as shown in the following screenshot:
- From the Add ArcGIS Server dialog box, select Publish GIS Services and click on Next.
- In the General dialog box, enter
http://ARCGISMACHINE:6080/arcgis
in the Server URL textbox. Remember,ARCGISMACHINE
is where you have installed ArcGIS for Server. In the Server Type textbox, select ArcGIS Server and type in yoursiteadmin
credentials in the authentication box and click on Finish. This is all shown in the following screenshot: - In the Publish a Service dialog box, enter
Bestaurants
as the Service Name and click on Next. - Keep the option Use existing folder enabled and click on Continue to start the Service Editor.
- In the Service Editor, click on Publish.
- If you were prompted with the Copying data to Server message, simply click OK. This will copy the Bestaurants data to a cached location. You can read more about caching at http://webhelp.esri.com/arcgisserver/9.3/dotNet/what_is_map_caching.htm.
- After a while, you should get the following message prompting that the service has been published: