Table of Contents
Offline Access Application
Updated by Prompt Support
Introduction
The API key and MSI file required for this installation can be accessed by Prompt Support, please request this information by emailing support@prompt.org.au
This document describes the steps to install and configure the PROMPT Offline On-Premises Solution.
It is important to note that this system is ONLY for Disaster Recovery (DR) situations. This does not replace, nor should it be used as a proxy for, the live Prompt Application. The features offered are limited by design, and some functions within documents will not work due to being in an offline nature (i.e. Links within documents will still point to the live site).
PROMPT Offline on-Premises Solution is a web application that runs under Internet Information Services (IIS) on a Windows-based Server. It contains the following components:
• PROMPT Offline Sync Agent
• PROMPT Offline Website Application
System Requirements
Supported platforms
• Microsoft Windows Server 2012 R2 or later
Disk space requirements
Prompt Offline on-Premises Solution and the documents data will be installed in C drive. The installation location cannot be changed.
To help confirm the disk space required for your organisation, we recommend running the Download All Documents report and reviewing the size of the unzipped report content.
Pre-requisite Components
Please ensure the following software has been installed before installing PROMPT Offline on-Premises Solution:
• Internet Information Service (IIS)
• .NET Core 3.1 Windows Server Hosting
• MySQL 8.0
Firewall Considerations
Prompt Offline on-Premises Solution requires HTTPS access to the URLs below for application and document access:
https://prod-prompt-offline-sync-packages.s3.ap-southeast-2.amazonaws.com
If your firewall can only handle IP addresses/ranges, then you can subscribe to receive an automated update on the AWS IP Address ranges in use.
https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html
Prerequisites Installation
Installation order
- Install Internet Information Service (IIS)
- Install .NET Core Hosting Bundle
- Install MySQL
Install IIS
You can install IIS from Server Manager > Add roles and features. PROMPT Offline on-Premises Solution does not require any special component from IIS. You can select Web Server (IIS) with the default components selected when adding IIS from Server Manager.
Please refer to the IIS configuration section of the Microsoft document below for IIS installation:
•Host ASP.NET Core on Windows with IIS
Install .NET Core
The .NET Core Hosting bundle is an installer for the .NET Core Runtime and the ASP.NET Core Module. The bundle allows ASP.NET Core apps to run with IIS.
Download
- Navigate to the Download .NET Core page
- Select the latest stable version of .NET Core 3.1
- Download Hosting Bundle from ASP.NET Core Runtime > Windows > Installers
Installation
- Run the .NET Core Hosting Bundle installer on the server
- Proceed with the default settings
Install MySQL 8.0
Download
- Navigate to the MySQL Community Download page
- Choose Download to download the full version of Windows (x86, 32-bit), MSI Installer.
[
mysql-installer-community-8.0.xx.x.msi ]
- Choose No Thanks, just start my download
Installation
The following steps are only applicable to your installation if you encounter the setup prompts below.
If you do not receive this prompt, please proceed with the default settings (choose Next, Execute or Finish).
- On Choosing a Setup Type, choose Server Only
- On Type and Networking, choose Config Type > Server Computer. This will configure MySQL to use a medium amount of Memory to allow other services to run alongside.
- On Type and Networking, choose a port number for MySQL to run on, leaving the default of 3306 is recommended if this port is available otherwise anything in the range of 3307 – 65535 will work as well.
- On Authentication Method, choose Use Strong Password Encryption for Authentication
- On Accounts and Roles, set up the root account password. PROMPT Website and Sync Agent are configured to work with the root account by default, you can ignore creating an additional MySQL user account. Please make a note of the password for later configuration.
- On Windows Service, leave default values for the Service name and account used to run the MySQL database server.
PROMPT Offline Application Installation
You can get the PROMPT Offline On-Premises Solution installation file from PROMPT support (file size varies):
The following components will be installed:
• PROMPT Offline Website
• PROMPT Offline Sync Agent
Installation Instructions
- Run the installer. Click Next
- Review and Accept the License Agreement. Click Next
- Configure the IIS website. You can change the settings from IIS Manager later if required.
- Input the password and port you saved from the previous MySQL installation, then click Next
- Enter the API Key provided by PROMPT support. This is used for the sync agent to identify itself to the offline packaging service and allow downloading new offline packages.
- Click Finish to complete the installation. PROMPT Offline on-Premises Solution now has been installed.
- PROMPT Offline Sync Agent will begin the initial sync in the back end to get the PROMPT Offline Package. It takes about 20 minutes to 60 minutes to complete. No window or notification will be prompted for this process. Please DO NOT restart the server.
- Once the sync is complete, you can open http://localhost:8080/ to access the PROMPT Offline Website. You will see an error message on the top right of the page if the initial sync is not complete.
Confirm Sync Status
Prompt's Offline Sync Agent relies on a lastSyncTime variable stored within MySQL. After a successful sync, the lastSyncTime updates to the current date/time. The sync agent will only fetch documents where the Last Updated Date of the document is greater than the lastSyncTime.
At a high level:
- A scheduled task triggers on the Prompt Offline Sync Solution server
- The sync agent queries an API endpoint referencing lastSyncTime
- The endpoint starts building a package of documents where the Last Updated Date is greater than the lastSyncTime, and the document is active
- If a package has already been generated for your organisation in the past 60 minutes, the sync agent will instead fetch this instead of building a new package
- Once the package generation is complete, the sync agent will download the content of this package onto the server
The above steps lead 2 expected sync scenarios:
- Initial Sync: After a fresh install, the lastSynctime on the server will either be null, or it will be set to 01/01/0001. This enables the Sync Agent to fetch all active documents for your organisation.
- Daily Sync: Triggered by a Scheduled Task, the sync agent fetches documents that are active and the updated date of the document is greater than the lastSyncTime
To locate the log output of the Sync Agent:
- Browse to C:\Program Files (x86)\Prompt\PROMPT.Offline\sync
- Open the latest log file: the naming convention for the log file is logyyyymmdd.txt, e.g., log20210805.txt
- If you see the following messages, it means it’s still waiting for the server to generate the offline package:
SyncAgent has polled for xxxxx minutes
Sending request to https://alb-xxx.prompt.org.au/api/offlinesync/poll
Response status code OK
Raw response {"Code":1,"PackageUrl":null}
- If you see the following messages, it means the sync has been completed.
SyncAgent finished polling sync controller for changes and got new package url
SyncAgent starting download of new package
SyncAgent downloaded 24 documents
SyncAgent adding/updating new documents
SyncAgent finished copying documents
SyncAgent adding/updating new offline data
SyncAgent creating 1 new Organizations
SyncAgent creating 11 new Departments
SyncAgent creating 7 new Sections
SyncAgent creating 6 new DocumentTypes
SyncAgent creating 24 new Documents
SyncAgent starting sync completed callback
SyncAgent completed.
- Browse to the following directory to confirm the Document IDs currently stored for the Offline Sync Solution: C:\ProgramData\Prompt\PROMPT.Offline\Documents
- Open http://localhost:8080 from a browser on the server, and search for a document
PROMPT Offline Application Overview
PROMPT Offline Website
Provides a basic search interface for accessing PROMPT Documents.
• No authentication required
• Accessible from http://localhost:8080
• Supports Chrome, Firefox, and Internet Explorer
PROMPT Offline Sync Agent
Background task that runs at midnight every day, pulls new Documents and Organisation data. Updates database with new or updated organisation data and copies new or updated documents to the documents folder.
• Requires API Key to connect to package service and download new distribution
• No interaction required
Troubleshooting
Use HTTPS for PROMPT Offline Website
PROMPT Offline Website uses HTTP by default. To use HTTPS, you will need to set up the Certificate, Client Trust, and DNS Failover/Failback which requires advanced configuration.
Please contact PROMPT support for the configuration instructions.
Default Install Locations
PROMPT Configuration | C:\ProgramData\Prompt\PROMPT.Offline |
MySQL | C:\ProgramData\MySQL\MySQL Server 8.0 |
PROMPT Website and Sync Agent | C:\Program Files (x86)\Prompt\PROMPT.Offline |
PROMPT Documents | C:\ProgramData\Prompt\PROMPT.Offline\Documents |
Application Log Files
Application logging is configured to use a 5-day rolling log rotation with a maximum of 1GB of log files
The naming convention is logyyyymmdd.txt.
PROMPT Sync Agent
The naming convention for log file logyyyymmdd.txt.
- C:\Program Files (x86)\Prompt\PROMPT.Offline\sync
PROMPT Website
The naming convention for log file logyyyymmdd.txt.
- C:\Program Files (x86)\Prompt\PROMPT.Offline\www
- C:\Program Files (x86)\Prompt\PROMPT.Offline\www\logs
Installation Log File
Details errors and informational install details of PROMPT Website and Sync Agent installer. Install_log.txt
log file for installation can be found in one of the following directories:
- C:\Users\Administrator\AppData\Local\Temp
OR
- C:\Users\UserName\AppData\Local\Temp
Sync Agent fails to run
This may be due to insufficient permissions on the installation folder preventing log files from being created. This can be resolved by adjusting the scheduled task to run with elevated privileges.
- Open Task Scheduler
- Go to Task Scheduler Library
- Right-click PROMPT Sync Agent and click on Properties
- Check the box Run with highest privileges and click OK to save the settings
Offline Documents Not Syncing
Symptoms
- There are no documents present on the Offline Website, or Searches yield no results.
- The local offline document folder is empty (C:\ProgramData\Prompt\PROMPT.Offline\Documents)
Potential Issues
- Sync Agent has not run
- Firewall rules blocking access
Solutions
Confirm the Sync Agent has run (see "Sync Agent fails to run")
To troubleshoot firewall issues, open the latest Offline Sync Agent log found in C:\Program Files (x86)\Prompt\PROMPT.Offline\sync
If you see the message below, it may indicate a firewall blocked the connection.
SyncAgent stopped unexpectedly System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it.
Ensure the application has access to the two sites listed in the Firewall section via HTTPS.
Re-run the Sync Agent via Task Scheduler