Book Image

Building Web Applications with ArcGIS

By : Hussein Nasser
Book Image

Building Web Applications with ArcGIS

By: Hussein Nasser

Overview of this book

Table of Contents (13 chapters)

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.

  1. Log in to the machine with the administrator account.

  2. Go to the root C: drive and create a new folder named 2955OT. Copy the folder named 2955OT_01_Files from the code bundle to the 2955OT folder.

  3. Open the 2955OT_01_Files folder and double-click on the MXD file Belize.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.

  4. When ArcMap opens, you should see the data as shown in the following screenshot:

  5. From the File menu, point to Share As and then click on Service ….

  6. Select Publish a Service and click on Next.

  7. From the Choose a connection drop-down list, click on Create New Connection icon as shown in the following screenshot:

  8. From the Add ArcGIS Server dialog box, select Publish GIS Services and click on Next.

  9. 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 your siteadmin credentials in the authentication box and click on Finish. This is all shown in the following screenshot:

  10. In the Publish a Service dialog box, enter Bestaurants as the Service Name and click on Next.

  11. Keep the option Use existing folder enabled and click on Continue to start the Service Editor.

  12. In the Service Editor, click on Publish.

  13. 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.

  14. After a while, you should get the following message prompting that the service has been published: