This document is archived and information here might be outdated.  Recommended version.

GISServerConnection Class (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Server > ESRI.ArcGIS.Server > Classes > G > GISServerConnection Class
ArcGIS Developer Help

GISServerConnectionClass Class

The ServerConnection object for connecting to the GIS server and getting the ServerObjectManager and ServerObjectAdmin.

Product Availability

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


The GIServerConnection provides connections to an ArcGIS Server over a LAN. This object supports a single interface: IGISServerConnection. The GISServerConnection can be used to connect to an ArcGIS Server by calling the Connect method on IGISServerConnection and providing the name or IP address of the machine on which the ArcGIS Server server object manager is running.

Once connected to the ArcGIS Server, the GISServerConnection can be used to get a reference to the ServerObjectManager, and the ServerObjectAdmin for making use of server objects and administering server objects, respectivly.

Supported Platforms



Interfaces Description
IGISServerConnection Provides access to members that connect to a GIS server.
IGISServerConnection2 Provides access to methods that connect a specified user to an ArcGIS server.


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. If the account running the application is not a member of this group, the Connect method will return an error.

Note: If you're connecting to the server with an ASP.NET web application, you may need to use impersonation to fix the identity of your application to a specific user account. For details on how to do this and how to encrypt the username and password, see article Q329290, "HOWTO: Use the ASP.NET Utility to Encrypt Credentials and Session State Connection Strings" in the Microsoft Knowledge Base.

Once connected, use the ServerObjectManager property on IGISServerConnection to get a reference on the ServerObjectManager. The ServerObjectManager provides methods for listing the server object types and server object configurations that have been configured on the server. The ServerObjectManager also provides methods for creating server contexts to provide access to and allow for the creation of server objects running within the server.

If the user account running the application is also a member of the agsadmin user group on the ArcGIS Server, the ServerObjectAdmin property on IGISServerConnection can be used to get a reference on the ServerObjectAdmin. If the user account running the application is not in the agsadmin user group, the ServerObjectAdmin property will return an error.

The ServerObjectAdmin provides methods for managing server object configurations, server object types, and the machines that host sever objects in the ArcGIS Server.

See Also

IServerContext Interface | IServerObject Interface | IServerObjectManager Interface | IServerObjectAdmin Interface