ArcGIS Explorer SDK Feedback via the User Forum
Adding and Deploying Custom Tasks

Glossary Item Box

Task Downloading

An NMF file may reference a task which does not already exist on the machine. In this case, Explorer needs to download the task to the machine in order to load and use it. Information in the NMF file is used to determine where the file is located and how to download it.

DownloadLocation Element

Explorer identifies the location from which to download task a from the same location as it identifies the task itself - the custom task description element in an NMF file. Remember that an NMF file may contain one, many or no tasks at all. Each custom task description element has a child element called DownloadLocation, which specifies a full path to a task assembly or task zip file. For example:

<DownloadLocation>http://www.MyCompany.com/ExplorerTasks/MyCustomTask.dll</DownloadLocation>

<DownloadLocation>http://www.MyCompany.com/ExplorerTasks/MyCustomTask.zip</DownloadLocation>

<DownloadLocation>ftp://ftp.MyCompany.com/ExplorerTasks/MyCustomTask.dll</DownloadLocation>

<DownloadLocation>file://ExplorerMachine\ExplorerTasks\MyCustomTask.dll</DownloadLocation>

<DownloadLocation>file://C:\ExplorerTasks\MyCustomTask.dll</DownloadLocation>

Task Downloading

When ArcGIS Explorer downloads a task, a number of actions are performed:

  1. The appropriate Tasks subfolder is created, based on the assembly name. See 'How Task Folders Are Named' in the Tasks folder topic for more information. 
  2. The DownloadLocation element is read, and the task assembly or zip file is copied from this location to the new task subfolder. See below for more information.
  3. If dealing with a zip file, it is unzipped into the task subfolder. See the Task Zip Files topic for more information.
  4. For each TaskUI class specified in the Class element of the NMF file being referenced, ArcGIS Explorer will create a single NMF file to describe that custom task. The naming convention for such files is <Namespace>.<TaskUIName>.nmf. As well as identifying the TaskUIs in the task assembly, this file is also used to store the download location of the element for future use. See the How Explorer Loads Custom Task Assemblies topic for more information.

Download Protocols

Downloading may occur by http, ftp protocols, or by a simple file copy from a UNC or local file path. The protocol should always be specified as part of the download location information, as shown above. The table below summarizes the possible uses of the DownloadLocation element.

Protocol Typical Structure Use
http http://<Domain>\<VirtalDirectory>\<File> When the task file is located on a web server.
ftp ftp://<FTPServer>\<HostDirectory>\<File> When the task file is located on an ftp server.
file file://<MachineName>\<ShareName>\<Path>\<File> When the task file is located at a local or UNC path.

In order for the download to be successful, you should ensure the following:

  • The details of assembly name, culture, public key token, and version must be specified correctly in the  NMF file. 
  • The DownloadLocation included in the NMF file must point to the location at which the file is located, and should include the appropriate protocol prefix.
  • The location must be accessible by the current user, as those credentials will be used to connect to the location.

If you are having problems with deploying and downloading tasks, refer to the Deployment Troubleshooting topic.