Skip to main content

ClientHub - Installation Guide

Change Log

  • 2024-03-27 - Added changes for release 28.
  • 2023-12-11 - Added changes for release 24.
  • 2023-09-18 - Added changes for release 21.

Requirements

The new ClientHub uses the ASP.NET Core SignalR which needs Sticky Sessions on the load balancer to work in an environment which is hosted across multiple VMs. See ASP.NET Core SignalR production hosting and scaling for more information.

note

Usually web applications made with .NET will only require the ASP.NET Core Runtime Hosting Bundle, but the ClientHub application now requires the .NET Desktop Runtime 8.0.x to be installed on the server in addition to the ASP.NET Core Runtime 8.0.x Hosting Bundle.

A mixture of new functionality and normal security upgrades in the ClientHub application required us to install the Microsoft.EntityFrameworkCore.SqlServer, which in turn has a dependency chain that ultimately includes the Microsoft.Web.WebView2 package specifically when building the application targeting Windows. Usually we would build using the generic .NET target, but LocalAD packages requires the Windows target. This Microsoft.Web.WebView2 dependency is the reason why the .NET Desktop Runtime 8.0.x is required.

We will change the build targeting in the future to avoid this dependency, but that can't happen until we can remove the LocalAD packages from the project.

Installation

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 Bliksund.EWA.ClientHub.SetParameters.xml or reuse the file when doing an upgrade.

  1. Edit the file Bliksund.EWA.ClientHub.SetParameters.xml and either change the values that are wrong for your system or copy in the values from the file used the last time. The default SetParameters.xml file should look like this:

    <?xml version="1.0" encoding="utf-8"?>
    <parameters>
    <setParameter name="IIS Web Application Name" value="Default Web Site" />
    <setParameter name="PEPJDatabaseConnection-Web.config Connection String" value="Data Source={Database Server};Initial Catalog={Database Name};User ID={Database Administrator};Password={Database Administrator Password};Pooling=False;MultipleActiveResultSets=True;Application Name=EntityFramework" />
    <setParameter name="Redis Backplane Connection String" value="" />
    <setParameter name="FormModuleAPI Path" value="https://localhost:62636/" />
    <setParameter name="FormModule Api Key" value="" />
    <setParameter name="ChatServer Endpoint" value="" />
    <setParameter name="ChatServer ApiKey" value="" />
    </parameters>
  2. After SetParameters.xml have been verified to be correct for your system run the command; Bliksund.EWA.ClientHub.deploy.cmd /T to see what changes will be done on the file system. (Files changed, added, removed)

  3. After this run the command; Bliksund.EWA.ClientHub.deploy.cmd /Y to do the actual changes.

SetParameters.xml values

NameDescriptionExample
IIS Web Application NameThe name of the IIS Web Application that the component should be installed to. Should be in format {SiteName}/{WebAppPath} where {SiteName} should be the name of the IIS site the webapp should use, and {WebAppPath} is the path of the webapp under the site.BliksundPEPJ/ClientHub
PEPJDatabaseConnection-Web.config Connection StringThe SQL connection string to the main EWA database.See https://www.connectionstrings.com/sql-server/ for examples
Redis Backplane Connection StringOptional connection string to the Redis server that the SignalR backplane should use. If no Redis database is configured, this line should be deleted which will make the SignalR use the SQL database as backplane.ewaRedisServer.com:6379,password=REDACTED
FormModuleAPI PathThe URL to the deployed FormModule API component.https://myewaserver.com/formmodule
FormModule Api KeyThe API key that the FormModule API component is configured with.REDACTED
ChatServer EndpointThe URL to the Chat server.https://myewaserver.com/ChatServer
ChatServer ApiKeyThe API key that the Chat server is configured to use.[REDACTED]
caution

The ChatServer Endpoint and ChatServer ApiKey parameters must have a value, even if you are not planning on using the chat functionality. If you are not planning on using the chat functionality, you can use the following values:

  • ChatServer Endpoint - https://notused
  • ChatServer ApiKey - notused

Release 24 changes

Release 24 introduces several new parameters that can be configured in the SetParameters.xml file.

  • ChatServer Endpoint - See description in the table above
  • ChatServer ApiKey - See description in table above

Release 21 changes

Release 21 introduces several new parameters that can be configured in the SetParameters.xml file.

  • Redis Backplane Connection String - See description in the table above
  • FormModuleAPI Path - See description in table above, but the module is not yet released. Should be removed.
  • FormModule Api Key - See description in table above, but the module is not yet released. Should be removed.

Backwards compatibility

It is highly recommended to upgrade the EWA client first when upgrading to release 17 where this component was first included.

The client application will be backwards compatible at all points with the old ClientAPI, but replacing the old ClientAPI with this component before upgrading the EWA Client will not work with the following features:

  • Manual export of medical record to DocuLive
  • New signing flyout (if it has been released)

Appsettings

The appsettings.json and appsettings.xml files contains configuration values for the web application. The application will load settings from both files, but the load order is first the json file, then the xml file. This means that settings in the xml file will override settings in the json file. It should be totally safe to delete the xml file if you just want one source of settings, but it should be noted that the xml files is used by the connection string replacement in WebDeploy so it will re-appear every time the application is upgraded through WebDeploy.

List of valid properties that we actively use in the web application are described below:

PropertyDescriptionDefault Value
ConnectionStrings.PEPJDatabaseConnectionThe connection string to the EWA database.Data Source={Database Server};Initial Catalog={Database};User ID={User};Password={Password};Pooling=False;MultipleActiveResultSets=True;Application Name=EntityFramework
EncryptionSecretDO NOT CHANGE[Redacted]
DispatchCodeRevisionNumber describing the revision number of the national index used by EMCCs in Norway40
PathOfDatasetFilesRelative path to dataset files that are not migrated to the database yetApp_Data/Datasets
AccessTokenTTLOnly used when system is configured with LocalAD authentication. Time to live for access token in hours.13