Add the control to the page
Open or create a Web site within Visual Studio.NET.
Open a Web form in design mode, select the Toolbox, and expand the
ArcGIS Web Controls tab. Drag and drop a
GeoprocessingResourceManager on the Web form. You should see the
following in Visual Studio.NET:
Note that the GeoprocessingResourceManager is only visible at design-time.
To add geoprocessing resources for use within your Web
application, activate the control, open or navigate to the Properties
window, and click the ellipsis next to the
property. A resource collection editor dialog should be displayed.
On the GeoprocessingResourceItem Collection Editor dialog, click the Add
button to add a data source as a geoprocessing resource to the
GeoprocessingResourceManager control. A
GeoprocessingResourceItem is added to the collection. The
following properties can be modified for a geoprocessing resource item
in the collection editor dialog:
The Name property is used to uniquely identify the resource within the
web application. It is highly recommended to set the resource name to a
descriptive value in your application.
GeoprocessingResourceItem Collection Editor dialog, the Definition
property provides a set of dialogs to connect to a data source provider and
configure a resource.
Click the ellipsis (...) for the Definition property to
open the Resource Definition Editor. Select the Type of data
source and define the appropriate properties (see dialogs below).
The Data Source property may be a url to an ArcGIS
Server service catalog or local machine name. The
Identity property enables you to define the appropriate runtime
credentials to connect to the data source and utilize the resource. The
Resource property defines the geoprocessing service to use
when working with the resource. The format of each property
string is defined by the type of data source.
data source types are available:
ArcGIS Server Local
Connecting to an ArcGIS
Server Local data source requires the machine name (connection host) on
which the Server Object Manager is running. Once entered, the Resource
property provides a list of available geoprocessing services. The
Additional GIS Servers button enables configuring a fail-over or
round-robin connection for the resource. See
Using the Connection Library for more details.
Note that the Identity property is grayed out and cannot be set from the
Resource Definition Editor dialog. At design-time, the identity of
the user running Visual Studio is used to connect to an ArcGIS Server local
data source. At runtime, that identity is established by the Web
application. Only one identity can be used to define access to all ArcGIS
Server local data sources in a single Web
application. This identity can be explicitly defined when
building the Web ADF application in Visual Studio by right-clicking the
Web project in Solution Explorer, and selecting the Add ArcGIS Identity
option. Enter the identity credentials that will be used to
access ArcGIS Server local resources at runtime. This information
will be added to the web.config file within a standard ASP.NET identity
tag. If the "Encrypt identity in web.config" checkbox is checked, the
identity tag is encrypted, otherwise the username and password are
stored as clear text.
ArcGIS Server Internet
ArcGIS Server Web Services require entering the partial URL to the ArcGIS
Manager collection of services. This URL includes the Web
server host name, ArcGIS instance, and "services" folder name.
This general URL provides a list of ArcGIS Server
Web Services to choose from.
If authentication is enabled for an
ArcGIS Server Web service, you must provide a username and password to gain
access to the Web service. ArcGIS Server Web services are designed to use
Basic authentication, therefore username and password are Base64 encoded and
included in the HTTP request to the Web server. Since this is inherently
insecure, confirm that your Web site provides a secure channel for
communication - namely it has enabled SSL encryption accessible via
HTTPS. This will sufficiently encrypt the transmission
of identity credentials for Basic
Once the data source and identity (if
necessary) are entered, the Resource property provides a list of available
geoprocessing services. The identity will determine which services are
available. If no identity is specified, the remote Web server is
responsible for assigning an identity, often an anonymous user account.
Specify buddy controls
To utilize the resources in the GeoprocessingResourceManager, add a
GeoprocessingTask control. As a Web task, the GeoprocessingTask control
can only work with one tool in one geoprocessing resource at a
time. You can also utilize geoprocessing resources
programmatically via geoprocessing functionalities.
The following table provides a list of properties of
interest. For complete reference information, see the
GeoprocessingResourceManager control in the library reference section.
||The collection of geoprocessing resource items managed by the resource manager.