![]() ![]() |
ESRI.ArcGIS.ADF.IMS | |
Connection Property | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.IMS.Carto Namespace > MapService Class : Connection Property |
Visual Basic (Declaration) | |
---|---|
Public Property Connection As ESRI.ArcGIS.ADF.Connection.IMS.IMSServerConnection |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As MapService Dim value As ESRI.ArcGIS.ADF.Connection.IMS.IMSServerConnection instance.Connection = value value = instance.Connection |
C# | |
---|---|
public ESRI.ArcGIS.ADF.Connection.IMS.IMSServerConnection Connection {get; set;} |
This example retrieves the Connection from an existing MapService object and prints the ArcIMS server name and port (this assumes we are using a TCPConnection to the server).
C# | ![]() |
---|---|
ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection conn = (ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection)mapService.Connection; lblConnection.Text = "Connection properties:<br>" + "Server: " + conn.Host + "Port: " + conn.AppServerPort; |
Visual Basic | ![]() |
---|---|
Dim conn As ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection _ = CType(mapService.Connection, ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection) lblConnection.Text = "Connection properties:<br>" _ + "Server: " + conn.Host _ + "Port: " + conn.AppServerPort |
This is the connection used to communicate with the ArcIMS service. The connection is specified when creating the MapService, and is read-only.
The property takes an instance of the abstract class IMSServerConnection. When reading the connection, cast it to the appropriate type of TCPConnection or HTTPConnection in order to read properties specific to the type.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family