New Server Setup Guide – Chattel

This guide contains the steps for setting up and configuring a new server for running the AgWare Chattel Web Application. If you already have the application installed and are upgrading, please see Upgrade Guide.

Windows Server Setup

Install IIS using the Windows Server Manager by adding the IIS Role. Make sure to include the Windows Authentication and WebSocket Protocol features.

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?tabs=aspnetcore2x

.Net Framework

The .Net framework version 4.6 or newer should already be installed on the Windows Server. If it is not, offline versions of the installer can be downloaded from Microsoft.

https://docs.microsoft.com/en-us/dotnet/framework/install/on-windows-10

Install the .NET Core Windows Server Hosting bundle

  1. Install the .NET Core Windows Server Hosting bundle on the hosting system. The bundle installs the .NET Core Runtime, .NET Core Library, and the NET Core Module. The module creates the reverse proxy between IIS and the Kestrel server. If the system doesn’t have an Internet connection, obtain and install the Microsoft Visual C++ 2015 Redistributable before installing the .NET Core Windows Server Hosting bundle.
    1. Navigate to the .NET All Downloads page.
    2. Select the latest non-preview .NET Core runtime from the list (.NET Core > Runtime > .NET Core Runtime x.y.z). Unless you intend to work with preview software, avoid runtimes that have the word “preview” in their link text.
    3. On the .NET Core runtime download page under Windows, select the Server Hosting Installer link to download the .NET Core Windows Server Hosting bundle.
  2. Important! If the hosting bundle is installed before IIS, the bundle installation must be repaired. Run the hosting bundle installer again after installing IIS.
  3. To prevent the installer from installing x86 packages on an x64 OS, run the installer from an administrator command prompt with the switch OPT_NO_X86=1.
  4. Restart the system or execute net stop was /y followed by net start w3svc from a command prompt. Restarting IIS picks up a change to the system PATH made by the installer.

Run the AgWare Chattel installer

Download the AgWare Chattel installer:

https://www.agwarefiles.com/maven/chattel/AgWare Chattel Setup 19.11.18.msi

The installer will default to the folder c:\AgWare\Chattel. We recommend installing to the default location.

The installer creates three primary folders:

  • Admin – This folder contains an admin tool to assist with creating new applications inside IIS. They can also be manually configured using IIS Manager.
  • AdminScripts – This folder contains PowerShell scripts that can be used for starting and stopping any Chattel web applications on this server. These scripts are run at the start and end of the install process but can also be run by administrators as needed.
  • web – This folder contains the .Net web application and will become the “Physical Path” for the web application in IIS.

Configure the Web Application

Navigate to c:\AgWare\Chattel\Admin folder and run the ChattelWeb.Admin.exe program.

Note: The ChattelWeb.Admin application may prompt to run as an Administrator. This is expected. The application will be adding applications to your IIS server which requires administrator privileges.

To setup an instance of Chattel, begin by clicking the “Add Application” button in the Admin tool. Doing so will bring up configuration details for the application.

Select the IIS Site and Application Pool that the Chattelinstance will run on. The Identity used by the Application Pool can be set using the Admin tool or configured on its own in IIS.

Once the Site and App Pool are selected, enter a name for the Chattel instance in the “Name” field in the Application section. The name used here will be used as the subdirectory on the IIS Site that will host the application, ex. “https://my-site.com/application-name”. The default is “AgWareChattel”.

After setting the application name, the database connection for the Chattel instance can be configured. Clicking the “Edit” button for the Database Connection String will open the configuration file for the instance. From here the connection string used to connect to the database can be modified.

After setting the Database Connection String, the instance can be created by clicking “Save”.

The AgWare Chattel Application is multi-tenant aware. You can have different URLs created where each application uses its own database. However, each web application must run the same version of Chattel. The provided MSI installer does not allow for side-by-side installations.

The multi-tenant setup can be used to hosts different associations or branches on a single IIS instance. It can also be used to setup a test instance that uses backup copy of the database for model testing.

To add another instance of Chattel, add another application by clicking “Add Application” and follow the instructions above.