





















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).
You can connect to a GIS Server using the ArcGIS Server library (ESRI.ArcGIS.Server) or the ArcGIS Connection library (ESRI.ArcGIS.ADF.Connection ).
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.ConnectionESRI.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: SecurityIn addition to the Connect method, the IGISServerConnection interface has two properties:ServerObjectManager and ServerObjectAdmin. If the application is running as a user in theusers or administrators group, the application can access the ServerObjectManager property,which returns an IServerObjectManager interface. The IServerObjectManager interface providesmethods for accessing and creating objects within the server for use by applications.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。