Working with the ArcGIS Server ArcObjects API : ArcObjects API

Posted on 2007-09-14 13:52  Ekin.S.Sun  阅读(923)  评论(0编辑  收藏  举报

Working with the ArcGIS Server ArcObjects API


Connecting to a GIS Server

To make use of ArcObjects via ArcGIS Server in your application, you must connect directly to the GIS server, which requires network access to the Server Object Manager (SOM).  

ArcGIS Server Connection objects

You can connect to a GIS Server using the ArcGIS Server library (ESRI.ArcGIS.Server) or the ArcGIS Connection library (ESRI.ArcGIS.ADF.Connection ).


[C#]  for ESRI.ArcGIS.Server
ESRI.ArcGIS.Server.GISServerConnectionClass gisconnection;
gisconnection = new ESRI.ArcGIS.Server.GISServerConnectionClass();
gisconnection.Connect("localhost");
ESRI.ArcGIS.Server.IServerObjectManager som = gisconnection.ServerObjectManager;
[C#] for ESRI.ArcGIS.ADF.Connection
ESRI.ArcGIS.ADF.Identity identity = new ESRI.ArcGIS.ADF.Identity("user", "passwd", "domain");
ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection ags_connection;
agsconnection = new ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection("hostname", identity);
agsconnection.Connect();
IServerObjectManager som = agsconnection.ServerObjectManager;
 
Connecting to the GIS Server: Security
In addition to the Connect method, the IGISServerConnection interface has two properties: 
ServerObjectManager and ServerObjectAdmin. If the application is running as a user in the 
users or administrators group, the application can access the ServerObjectManager property, 
which returns an IServerObjectManager interface. The IServerObjectManager interface provides 
methods for accessing and creating objects within the server for use by applications. 
 
 
 

Copyright © 2024 Ekin.S.Sun
Powered by .NET 9.0 on Kubernetes