- Set up an application with the listed assemblies.
- Set the properties of a TCP or HTTP connection to the appropriate values.
// Using the ArcGIS Connection library - TCP
ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection tcpConnection = new
ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection(serverName, 5300);
tcpConnection.ServiceName = serviceName;
// Using the ArcIMS Connection library - HTTP
ESRI.ArcGIS.ADF.Connection.IMS.HTTPConnection httpConnection = new
ESRI.ArcGIS.ADF.Connection.IMS.HTTPConnection("http://webservername");
httpConnection.ServiceName = serviceName;
// Using the ArcIMS API
ESRI.ArcGIS.ADF.IMS.Carto.MapService mapService = new
ESRI.ArcGIS.ADF.IMS.Carto.MapService(tcpConnection, new
ESRI.ArcGIS.ADF.IMS.Carto.InitializationParameters(), true);
ESRI.ArcGIS.ADF.IMS.Carto.MapView mapView = mapService.CreateMapView();
[VB.NET]
' Using the ArcGIS Connection library - TCP
Dim tcpConnection As ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection = New ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection(serverName, 5300)
tcpConnection.ServiceName = serviceName
' Using the ArcIMS Connection library - HTTP
Dim httpConnection As ESRI.ArcGIS.ADF.Connection.IMS.HTTPConnection = New ESRI.ArcGIS.ADF.Connection.IMS.HTTPConnection("http://webservername")
httpConnection.ServiceName = serviceName
' Using the ArcIMS API
Dim mapService As ESRI.ArcGIS.ADF.IMS.Carto.MapService = New ESRI.ArcGIS.ADF.IMS.Carto.MapService(tcpConnection, New ESRI.ArcGIS.ADF.IMS.Carto.InitializationParameters(), True)
Dim mapView As ESRI.ArcGIS.ADF.IMS.Carto.MapView = mapService.CreateMapView()
To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
ESRI.ArcGIS.ADF.Connection ESRI.ArcGIS.ADF.IMS