Document Handler White Paper

Purpose of the program

The ayfie Document Handler is a native ayfie utility for Windows used for opening search result links.  It extends the functionality of the search results page.

While ayfie offers a solution that lets users "download a copy" of the searched document, this is not optimal for users who want to start working on their documents right away.  The Document Handler solves this problem.  It enables the web client to communicate with end user desktops to open files directly in the user's native application.

Architecture Overview

When the user clicks a Document Handler link (“vw:”) on the ayfie search page, the browser will look in the Windows registry for the application registered to handle this URI scheme. This is supported by the most common web browsers (e.g. Internet Explorer, Firefox and Chrome).  The ayfie Document Handler executable will then be launched, with the entire URI as input to the executable.

The Document Handler will then parse the input parameters and check if it’s the first instance of the program in memory. If it’s not (i.e. another Document Handler instance is already running), it will ask the first instance to handle the request, and the second instance will then exit.

The Document Handler will then process the request.  It will load the corresponding plugin (e.g. Exchange protocol handler plugin to handle opening items from Exchange). The plugin will then try to open up the specified item.

You can read more about custom protocol handlers at http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx

Changes made to the system

File-system

Version

Default installation destination

Single User

c:\Users\<User>\AppData\Local\Apps\Locator DocumentHandler

Multi User

c:\Program Files (x86)\ayfie\Locator DocumentHandler

File

Description

log4net.dll

3rd party component used for logging

log.config

Configuration file for logging

InstallLogging.config

Configuration file for logging

Via.SDK.ConnectorPlugins.dll

Locator platform assembly

Via.Client.Components.Core.dll

Locator platform assembly

Via.Utility.dll

Locator platform assembly

Via.Application.DocumentHandler.exe

The main executable

Via.Application.DocumentHandler.exe.config

Application configuration file

Via.DocumentHandler.Service.exe

Document Handler service – only installed for multi-user version of Document Handler.

AutomaticUpdater.dll

3rd party component used for automatic updates

wyUpdate.exe

3rd party component used for automatic updates

client.wyc

3rd party component used for automatic updates

OFFICE.DLL

Microsoft Office Core Primary Interop assembly

Via.Alfresco.ProtocolHandler.Plugin.dll

Plugin to handle documents from Alfresco

Via.Domino.ProtocolHandler.Plugin.dll

Plugin to handle documents from IBM Domino

Via.EdocsDM.ProtocolHandler.Plugin.dll

Plugin to handle documents from eDOCS DM

Via.Exchange.ProtocolHandler.Plugin.dll

Plugin to handle documents from Microsoft Exchange

Via.FileServer.ProtocolHandler.Plugin.dll

Plugin to handle documents from a fileserver

Via.LoboDMS.ProtocolHandler.Plugin

Plugin to handle documents from LoboDMS

Via.WorkSite.ProtocolHandler.Plugin

Plugin to handle documents from WorkSite

 In addition, we install Microsoft .NET Framework v4.5.2 for Document Handler v2.9 and newer – if you use the single user executable (not the MSI’s).

Log Files

Version

Location log file(s)

Single User

  • Locator 2.11 SR5 and older: c:\Users\<User>\AppData\Roaming\VirtualWorks\DocumentHandler

  • Locator 2.11 SR6 and newer: c:\Users\<User>\AppData\Roaming\ayfie\DocumentHandler

Multi User

  • Locator 2.11 SR5 and older: c:\ProgramData\Virtual Works\ViaWorks\Log

  • Locator 2.11 SR6 and newer: c:\ProgramData\ayfie\DocumentHandler

Windows Registry

Key

Description

Vw

The VirtualWorks protocol that we register – vw for short.

ViaWorksDocumentHandler

Used to automatically run Document Handler when Windows starts

Single User Version

Key

Path

Vw

HKEY_CURRENT_USER\Software\Classes

ViaWorksDocumentHandler

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

 

Multi User Version

Key

Path

Vw

HKEY_CLASSES_ROOT

ViaWorksDocumentHandler

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

 

Windows Services

To avoid complications, such as having a “port-listening-process” for each terminal server user logged in, and to ensure proper functioning, the Document Handler Multi User version installs a Windows service named “ayfie DocumentHandler Service”, running under the Local System account.


Resources used

Memory

The Document Handler will typically use about 30MB RAM, and about twice that amount for virtual memory (i.e. pageable memory).

Disk

Less than 6MB of disk-space is consumed.

Network

The Document Handler will check for updates once per hour, however, this interval can be changed (see the “Settings” section). The primary update server is s3.amazonaws.com, with product.virtualworks.com used as the secondary.

The Document Handler will listen for HTTP requests to address 127.0.0.1 and port 15785. The multi-user version will also listen for HTTPS requests on port 15786. This is used in order for the ayfie web client to detect whether or not the Document Handler is installed and running locally. Spotify (and other applications) use this same approach.

There will also be network traffic between the client computer and the source system from which the user attempts to open a file.

PLEASE NOTE: The network traffic between the client computer and source system, if the source system is file server, Document Handler checks that the source system is alive. It performs this check being sending a ICMP PING request. If for any reason ICMP PING is filtered, either on the file server itself or by a network firewall policy, ICMP PING traffic needs to be allowed in the underlying network policy used. Alternatively, this ping check can be disabled, but requires a custom configuration file to be deployed on each client where Document Handler is installed. More information on this is found here: Disable Document Handler ping to file server

Security

No explicit permissions are set on the files and folders created by the installer, so they will inherit the permissions from the parent folder.

The Document Handler doesn’t send or store any sensitive information.

Settings

The Document Handler has only one setting, UpdateCheckInterval, located in the file Via.Application.DocumentHandler.exe.config. This setting controls how often the application checks for updates. The default is 1 hour (3600000ms)

Windows versions supported

The single-user version of the Document Handler can run on the following versions of Windows (both 32- and 64-bit):

  • Windows 7 (SP1 or higher)

  • Windows 8 and 8.1

  • Windows 10

The multi-user version of the Document Handler can in addition run on these Windows Server versions:

  • Windows Server 2008 SP2

  • Windows Server 2008 R2 SP1

  • Windows Server 2012

  • Windows Server 2012 R2

  • Windows Server 2016

Known issues

Web browser should be kept up to date to ensure proper Document Handler behaviour. On no longer supported versions of Edge and Chrome web browsers, the prompt before opening a document might not have the option to allow opening further documents without asking. In case the browser cannot be upgraded, registry has to be manually updated with the following keys (HKLM\SOFTWARE\Policies\Google\Chrome for Chrome and HKLM\SOFTWARE\Policies\Microsoft\Edge\ for Edge):

  • new entry AutoLaunchProtocolsFromOrigins with value [{"protocol":"vw","allowed_origins":[""]},{"protocol":"ViaWorksDocumentHandler","allowed_origins":[""]}]

  • new key URLAllowlist with 2 entries (incremented number as each entry name) with values: vw:* and ViaWorksDocumentHandler:*

Figures 1-3 show how the registry editor should look after required modifications.

Figure 1. Registry entries structure.
Figure 2. Launch protocols entry.

Reference articles:

 

ayfie