ArcObjects Library Reference  (Server)    

IGISServerConnection.Connect Method

Connects to the GIS server specified by the machineName.

[Visual Basic 6.0]
Sub Connect(
    ByVal machineName As String _
[Visual Basic .NET]
Public Sub Connect ( _
    ByVal machineName As String _
public void Connect (
    string machineName
public void connect (
    String machineName
HRESULT Connect(
  BSTR machineName


machineName [in]

  machineName is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


In order to succesfully connect to the ArcGIS Server using the Connect method on IGISServerConnection, the user account running the application must be a member of the agsusers user group on the ArcGIS Server.

[Visual Basic 6.0]

The following VB code shows how to use the IGISServerConnection interface to connect to an ArcGIS Server running on a machine called "melange":

  Dim pGISServerConnection As IGISServerConnection
  Set pGISServerConnection = New GISServerConnection
  pGISServerConnection.Connect "melange"

The above code assumes that ArcObjects have been installed on the machine which is running the VB applicaiton (by installing the ArcGIS Server Container, ArcEngine, or ArcGIS Desktop).

See Also

IGISServerConnection Interface


esriServer IGISServerConnection Example