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
- WebDeploy IIS extension (Web Deploy 3.6 : The Official Microsoft IIS Site)
- IIS WebSockets Protocol enabled (WebSocket | Microsoft Docs)
- ASP.NET Core Runtime 8.0.x Hosting Bundle (Download .NET 8.0 (Linux, macOS, and Windows))
- .NET Desktop Runtime 8.0.x (Download .NET 8.0 (Linux, macOS, and Windows))
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.
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.
-
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> -
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) -
After this run the command;
Bliksund.EWA.ClientHub.deploy.cmd /Y
to do the actual changes.
SetParameters.xml values
Name | Description | Example |
---|---|---|
IIS Web Application Name | The 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 String | The SQL connection string to the main EWA database. | See https://www.connectionstrings.com/sql-server/ for examples |
Redis Backplane Connection String | Optional 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 Path | The URL to the deployed FormModule API component. | https://myewaserver.com/formmodule |
FormModule Api Key | The API key that the FormModule API component is configured with. | REDACTED |
ChatServer Endpoint | The URL to the Chat server. | https://myewaserver.com/ChatServer |
ChatServer ApiKey | The API key that the Chat server is configured to use. | [REDACTED] |
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 aboveChatServer 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 aboveFormModuleAPI 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:
Property | Description | Default Value |
---|---|---|
ConnectionStrings.PEPJDatabaseConnection | The 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 |
EncryptionSecret | DO NOT CHANGE | [Redacted] |
DispatchCodeRevision | Number describing the revision number of the national index used by EMCCs in Norway | 40 |
PathOfDatasetFiles | Relative path to dataset files that are not migrated to the database yet | App_Data/Datasets |
AccessTokenTTL | Only used when system is configured with LocalAD authentication. Time to live for access token in hours. | 13 |