How to connect to ArcGIS Server in Local Mode

Source: Internet
Author: User

From: http://blog.csdn.net/junmail/archive/2008/05/14/2444436.aspx

How to connect to ArcGIS Server in Local Mode

When using the ArcGIS Server ArcObjects API, you generally need to connect to the GIS server in local mode. Therefore, there are two classes in version 9.2 that can be connected to the GIS server. One is the ESRI. ArcGIS. server. gisserverconnectionclass class, and the other is the ESRI. ArcGIS. ADF. Connection. AGS. agsserverconnection class.

ESRI. arcGIS. server. the gisserverconnectionclass class is encapsulated for the com class.. Net class. When you connect to the GIS server, there is no explicitly specified user. So what users are used to connect to the GIS server? Actually, it is the user of the Web application used. If there is an identity node in Web. config, it will be it. ConnectedCodeAs follows:

[C #]
ESRI. ArcGIS. server. gisserverconnectionclass gisconnection;
Gisconnection = new ESRI. ArcGIS. server. gisserverconnectionclass ();
Gisconnection. Connect ("servername ");
ESRI. ArcGIS. server. iserverobjectmanager som = gisconnection. serverobjectmanager;

The ESRI. ArcGIS. ADF. Connection. AGS. agsserverconnection class is a pure. Net class. In fact, all classes in the ESRI. ArcGIS. ADF. Connection class library are. Net classes. We recommend that you use agsserverconnection when connecting to the server. This class needs to explicitly specify the identity information. usage is as follows:

[C #]
ESRI. ArcGIS. ADF. Identity identity = new ESRI. ArcGIS. ADF. Identity ("user", "passwd", "Domain ");
ESRI. ArcGIS. ADF. Connection. AGS. agsserverconnection agsconnection;
Agsconnection = new ESRI. ArcGIS. ADF. Connection. AGS. agsserverconnection ("hostname", identity );
Agsconnection. Connect ();
Iserverobjectmanager som = agsconnection. serverobjectmanager;

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.