Skip to main content

Version Manager Module API - Installation Guide

Installation

Prerequisite: The Version Manager API artifacts are downloaded for deployment.

artifacts

IMPORTANT: This is an ASP.NET Core project so it must be installed on it's own AppPool in IIS from all other ASP.NET Core components for everything to function correctly.

Using Web Deploy is the recommended way to both install and upgrade this component. Either set all the values in VersionManager.Api.SetParameters.xml or reuse the file when doing an upgrade.

  1. Edit the file VersionManager.Api.SetParameters.xml with suitable values in your system or copy the values from the file used in the last build. The initial of SetParameters.xml should look like this:
<?xml version="1.0" encoding="utf-8"?>
<parameters>
<setParameter name="IIS Web Application Name" value="Default Web Site" />
<setParameter name="ConnectionStrings__VersionManagerDatabase" value="Data Source={Database Server};Initial Catalog={Database Name};User ID={Database Administrator};Password={Database Administrator Password};Pooling=False;MultipleActiveResultSets=True;Application Name=VersionManager" />
<setParameter name="Company__Id" value="null" />
<setParameter name="Authorization__DeviceApiKey" value="ReplaceThisDefaultApiKey" />
<setParameter name="Authorization__WebsiteApiKey" value="ReplaceThisDefaultApiKey" />
<setParameter name="CorsPolicy__AllowedOrigins" value="" />
</parameters>
  1. After SetParameters.xml have been verified to be correct for your system run the command; VersionManager.Api.deploy.cmd /T to see what changes will be done on the file system. (Files changed, added, removed)
  2. After this run the command; VersionManager.Api.deploy.cmd /Y to do the actual changes.

Appsettings

The appsettings.json file contain configuration values for the web API. The values of appsettings.json will be updated after executing the command VersionManager.Api.deploy.cmd /Y

Here is the list of valid properties that we actively use in the Version Manager API:

PropertyDescriptionDefault Value
ConnectionStrings.VersionManagerDatabaseThe connection string to the database.Data Source={Database Server};Initial Catalog={Database Name};User ID={Database Administrator};Password={Database Administrator Password};Pooling=False;MultipleActiveResultSets=True;Application Name=VersionManager
Company.IdThe default company identity number for entities. Must be null or an integer.null
Authorization.DeviceApiKeyThe API key the service on the devices needs to perform queries in order to download new versions.ReplaceThisDefaultApiKey
Authorization.WebsiteApiKeyThe API key needed for the website proxyReplaceThisDefaultApiKey
CorsPolicy.AllowedOriginsString of comma separated origins to allow through CORS policy.""