How to use
Data has been provided for your use with this sample. It can be found at
<Your ArcGIS Developer Kit Install directory>/Samples/data/Montgomery/MontgomerySimple.mxd.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders.
However, you will need to update the sample to point to the location of the data once you have extracted all the files.
At design time
- Assuming both the web service and application are being installed on the same machine, verify that the web ADF for the .NET Framework is installed and functioning properly. For information on installing and configuring the Web ADF, consult the installation guide.
- In Windows Explorer, navigate to <ArcGIS Developer Kit install location>\Samples\ServerNET\ArcGIS_SimpleEdit.
- Open the directory of the language you are going to use (that is, CSharp or VBNet) and copy the ArcGIS_SimpleEdit_<language> folder to c:\inetpub\wwwroot. The <language> variable can be CSharp or VBNet.
- Set up access to the data by following the steps in the "Set up access to the data" section in this sample.
- Create the map service by following the steps in the "Create the map service" section in this sample.
- Open the IIS Manager from Control Panel, Administrative Tools, Internet Information Services (IIS) Manager, or Internet Information Services.
- In the console tree view on the left, navigate to Local Computer, Web Sites, Default Web Site, or navigate to the web site on which you would like to configure the sample.
- Open the ArcGIS_SimpleEdit_<language> folder, right-click the ArcGIS_SimpleEdit_WebService folder, and click Properties. The Properties dialog box appears.
- Click the Directory tab, click the Create button in the Application Settings section, then click OK to close the Properties dialog box.
- Open the ArcGIS_SimpleEdit_<language> folder, right-click the ArcGIS_SimpleEdit_WebApp<language> folder, and click Properties. The Properties dialog box appears.
- Click the Directory tab, click the Create button in the Application Settings section, then click OK to close the Properties dialog box.
- Start Visual Studio 2010, and open the ArcGIS_SimpleEdit_<language> solution (for example, ArcGIS_SimpleEdit_CSharp2010.sln) located in c:\inetpub\wwwroot\ArcGIS_SimpleEdit_<language>\ArcGIS_SimpleEdit_<language><vs_version>.
- In the Solution Explorer, right-click the ArcGIS_SimpleEdit_WebApp<language> project, and select Set as StartUp Project.
- Right-click Default.aspx and select Set As Start Page.
- Open the code-behind for the AddActionLocationService.cs (.vb if working in VB.NET) in the webservice project and update the ArcGIS identity username, password, and domain or machine.
- Click the Debug menu, click Start Debugging or press F5. The ArcGIS_SimpleEdit application starts.
- Address any errors that occur in the debugging process.
- Check Layer name in mapservice matches layername used in the code. Also Identity parameters should be changed in AddActionLocationService file under App_code folder.
At run time
- Open a browser and navigate to the web application's default page (for example, http://localhost/ArcGIS_SimpleEdit_CSharp/ArcGIS_SimpleEdit_WebAppCSharp/Default.aspx) or start the Web application in Visual Studio.
- Type a value in the Service Name and Service Details text boxes. Service Name is the name of the customer, and Service Details contains specific information about the service call. Use the Service Type drop-down menu to select the service call type.
- Select the Add Service Call tool and click the map. A new service call with the parameters you added is added to the map.
- Use the Identify Service Call tool to query current service calls in the ServiceCalls feature class. The results are returned in a table below the map.
Additional information
Set up access to the geodatabase
Do the following:
- You must have access to SQLExpress, configured for use with ArcSDE workgroup geodatabases, to use the data packaged with this sample. If you use your data, you need to change portions of the sample code for it to function.
- Start ArcCatalog, click Add Database Server under Database Servers, and connect to SQLExpress.
- Right-click the SQLExpress instance, select Permissions, and add the ArcGIS Server container account.
- Right-click the SQLExpress instance, select Attach, and navigate to the Montgomery.mdf file included the samples data (for example, c:\iArcGIS\ProgramFiles\DeveloperKit10.0\Samples\Data\Montgomery.mdf). The Montgomery geodatabase is added to the geodatabase list for the SQLExpress instance in ArcCatalog.
- Right-click the Montgomery geodatabase, select Administration, Permissions, then grant the ArcGIS Server container account (ArcGISSOC) read/write privileges.
Configure the map document and create the map service
Do the following:
- Open the MontgomerySimple.mxd file in ArcMap. Because the data source for every layer is invalid, a red exclamation point shows next to each layer name.
- Click the red exclamation point next to the Dimension features layer. The Set Data Source dialog box appears. See the following screen shot:
- Navigate to the SQLExpress instance where the Montgomery geodatabase is available, select the Montgomery.DBO.Dimensions feature class in the Montgomery.DBO.Landbase feature dataset, then click OK. Data sources for the layers in the map document are repaired.
- Save the map document. The following screen shot shows how the ArcMap window looks:
- Open ArcCatalog and add a new map service with the following properties:
- Name—MontgomerySimple
- Map document—<path to MontgomerySimple.mxd>
- Pooling—Pooled, Min instances: 0, Max instances 2
- Start the service.
ArcGIS_SimpleEdit_CSharp\ArcGIS_SimpleEdit_WebService\AddActionLocation.asmx | Web service endpoint. |
ArcGIS_SimpleEdit_CSharp\ArcGIS_SimpleEdit_WebService\App_Code\AddActionLocationService.cs | Web service source code. Defines the public members and types, as well as process logic. |
ArcGIS_SimpleEdit_CSharp\ArcGIS_SimpleEdit_WebAppCSharp\Default.aspx | Default page contains a set of custom tools to add a service call and identify existing service calls. |
ArcGIS_SimpleEdit_CSharp\ArcGIS_SimpleEdit_WebAppCSharp\Default.aspx.cs | Code behind the user interface (UI). |
ArcGIS_SimpleEdit_CSharp\ArcGIS_SimpleEdit_WebAppCSharp\App_Code\AddPointTool.cs | Contains tool code used to add a service call using the web service. |
ArcGIS_SimpleEdit_CSharp\ArcGIS_SimpleEdit_WebAppCSharp\App_Code\IdentifyTool.cs | Contains tool code used to identify existing service calls via the map service. |
ArcGIS_SimpleEdit_CSharp\ArcGIS_SimpleEdit_WebAppCSharp\App_Code\Utility.cs | Class library containing helper code. |
ArcGIS_SimpleEdit_VBNet\ArcGIS_SimpleEdit_WebService\AddActionLocation.asmx | Web service endpoint. |
ArcGIS_SimpleEdit_VBNet\ArcGIS_SimpleEdit_WebService\App_Code\AddActionLocationService.vb | Web service source code. Defines the public members and types, as well as process logic. |
ArcGIS_SimpleEdit_VBNet\ArcGIS_SimpleEdit_WebAppVBNet\Default.aspx | Default page contains a set of custom tools to add a service call and identify existing service calls. |
ArcGIS_SimpleEdit_VBNet\ArcGIS_SimpleEdit_WebAppVBNet\Default.aspx.vb | Code behind the user interface (UI). |
ArcGIS_SimpleEdit_VBNet\ArcGIS_SimpleEdit_WebAppVBNet\App_Code\AddPointTool.vb | Contains tool code used to add a service call using the web service. |
ArcGIS_SimpleEdit_VBNet\ArcGIS_SimpleEdit_WebAppVBNet\App_Code\IdentifyTool.vb | Contains tool code used to identify existing service calls via the map service. |
ArcGIS_SimpleEdit_VBNet\ArcGIS_SimpleEdit_WebAppVBNet\App_Code\Utility.vb | Class library containing helper code. |
Download the files for all languages