Virtual Directories

Essentials supports the use of virtual directories to serve static content, such as images or other data files. For example, you could use a virtual directory for the images that you use in your viewers.

Virtual directories improve site portability and ease of deployment:

Do not put files containing sensitive content in virtual directories—security does not apply to virtual directories.

Essentials will not serve a site configuration file.

Essentials supports three levels of virtual directories:

Virtual directories in the file system, shown using Manager's Browse the Sites Folder function

The Global Virtual Directory

Essentials provides a predefined, global virtual directory, the REST Virtual Directory. The global virtual directory is used to store content that is shared between sites. In the Sites folder, the global virtual directory is called VirtualDirectory.

In Manager, there is a Browse button anywhere that you can configure a URI to static content, for example, where you select the icon to represent a layer in the viewer. Click the Browse button to open a dialog box for selecting and managing virtual directory files. The management tools include tools to create new folders , upload files , and delete files and folders .

Dialog box to work with the site's virtual directory and the global ("REST") virtual directory

When you select a file, Manager displays the file's location in the Location box. The location contains a client token in the file path, which represents the URL of the selected virtual directory.

In the default Essentials deployment, the global virtual directory's URL is:

http://[host]/Geocortex/Essentials/REST/virtualdirectory

where [host] is the Essentials web server.

Virtual Directories for Sites

Each site can have a virtual directory. A site's virtual directory is used for content that is specific to the site.

A site's virtual directory can have sub directories. This means you can keep the static content for your sites organized according to the standard scheme for websites.

Unlike the global virtual directory and viewer virtual directories, which are created by Essentials, you must add the virtual directories for sites. See Create a Virtual Directory for a Site for instructions.

By convention, virtual directories for sites are named VirtualDirectory in the file system, like the global and viewer virtual directories. If you use a different name for a site's virtual directory, the virtual directory is still referred to as virtualdirectory in URLs—virtual directories for sites are always referred to as virtualdirectory in URLs, no matter what name you have given the folder in the file system.

In the default Essentials deployment, the URL for a site's virtual directory is:

http://[host]/Geocortex/Essentials/REST/sites/[SiteID]/virtualdirectory

where [host] is the Essentials web server and [SiteID] is the site's ID.

Create a Virtual Directory for a Site

to create a virtual directory for a site:

  1. If you already have a folder that contains the site's static content, move the folder to the site's folder.

    Otherwise, create a new subfolder in the site's folder. By convention, the folders for virtual directories are named VirtualDirectory.

    By default, the site's folder is:

    C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\[site name]

  2. In Manager, edit the site that you want to configure, and then click Site Info in the side panel.

  3. In the Additional Information area, click the Select hyperlink near Virtual Directory.

  4. Select the folder that you want to use as the virtual directory.

    The folder's location appears in the Selected Path box. The path uses the {RootPath} server token.

  5. Click OK.

Virtual Directories for Viewers

Essentials creates a virtual directory for each Geocortex viewer that you add to a site. When you configure a viewer in Manager, there is a Browse button anywhere that you can configure a URI to static content, for example, where you select the viewer's banner images. Click the Browse button to open a dialog box for selecting and managing files in the viewer’s virtual directory.

Dialog box to work with a viewer's virtual directory

In the default Essentials deployment, the URL for a viewer's virtual directory is:

http://[host]/Geocortex/Essentials/REST/sites/[SiteID]/viewers/[ViewerID]/virtualdirectory

where [host] is the Essentials server, [SiteID] is the site's ID, and [ViewerID] is the viewer's ID.