ArcObjects Library Reference  (Server)    

esriServer GISServerConnection Example

[Visual Basic 6.0]

The following VB code shows how to use the ServerConnection to connect to an ArcGIS Server running on a machine

called "melange", and print out the names and types of the server object configurations configured on the server:

   Dim pGISServerConnection As IGISServerConnection
  Set pGISServerConnection = New GISServerConnection
  pGISServerConnection.Connect "melange"
 
  Dim pServerObjectManager As IServerObjectManager
  Set pServerObjectManager = pGISServerConnection.ServerObjectManager
 
  Dim pEnumConfigInfo As IEnumServerObjectConfigurationInfo
  Set pEnumConfigInfo = pServerObjectManager.GetConfigurationInfos
 
  Dim pConfigInfo As IServerObjectConfigurationInfo
  Set pConfigInfo = pEnumConfigInfo.Next
  Do Until pConfigInfo Is Nothing
    Debug.Print pConfigInfo.Name & ": " & pConfigInfo.TypeName
    Set pConfigInfo = pEnumConfigInfo.Next
  Loop

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


[Visual Basic .NET, C#, C++]
No example is available for Visual Basic .NET, C#, or C++. To view a Visual Basic 6.0 example, click the Language Filter button Language Filter in the upper-left corner of the page.