This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > GISClient > ESRI.ArcGIS.GISClient > Interfaces > IA > IAGSServerConnectionFactory Interface > IAGSServerConnectionFactory.Open Method (ArcObjects .NET 10.4 SDK) |
Opens the GIS server connection specified by the connection properties.
[Visual Basic .NET] Public Function Open ( _ ByVal pConnectionProperties As IPropertySet, _ ByVal hWnd As Integer _ ) As IAGSServerConnection
[C#] public IAGSServerConnection Open ( IPropertySet pConnectionProperties, int hWnd );
[C++]
HRESULT Open(
IPropertySet* pConnectionProperties,
long hWnd,
IAGSServerConnection** ppConnection
);
[C++]
Parameters pConnectionProperties [in]
pConnectionProperties is a parameter of type IPropertySet hWnd [in] hWnd is a parameter of type long ppConnection [out, retval]
ppConnection is a parameter of type IAGSServerConnection
Use the Open method to create an AGSServerConnection based on a property set. The properties required in the property set depend on whether you are connecting directly to a GIS server over a LAN, or if you are connecting to a web service catalog. When connecting to a GIS server over the LAN, you need to set the machine property to be the name of the GIS server machine. When connecting to a web service catalog, you need to set the url property to the url of the web service catalog.
If the web service catalog you are connecting to is secure and requires a username and password, include them in the property set as the user and password properties, respectivly.