FactoryLogix Learning

PLC CFX Gateway installation

KB ARTICLE

Overview

This article describes how to install the PLC-CFX Gateway.

Prerequisites

  • Download and install the .NET 6 Hosting Bundle from https://dotnet.microsoft.com/en-us/download/dotnet/6.0.

  • A new local or domain user account with local administrator rights on the target machine.

  • Microsoft SQL Server Management Studio (SSMS) access.

Installation procedure

  1. Obtain the latest version of the PLC CFX Gateway installation package.

  2. On the target machine, create the folder C:\Program Files (x86)\Aegis\PLCGateway\.

  3. Copy all installation package contents into the newly created PLCGateway folder.

  4. Configure the database (see the Database configuration section).

  5. Create a new local or domain user account with local administrator rights on the target machine.

  6. Create the ASP.NET Core service (see the Creating the ASP.NET Core service section).

  7. Right-click PLCGateway\AegisCFXGateway.pfx and select Install PFX. Select Local Machine. When prompted for a password, enter GatewayAdmin123*. Select Place Certificate in the Following Store, then select Trusted Root Certification Authorities.

  8. Edit the appsettings.json file in the PLCGateway folder to set the database connection string and PLCCFXGateway server details (see the Appsettings.json configuration section).

  9. Open services.msc, navigate to Aegis PLC Gateway Service, then start the service.

  10. Navigate to https://localhost:5251 and log in using the username admin and password GatewayAdmin123*.

Database configuration

  1. Open Microsoft SQL Server Management Studio.

  2. Create a new database and add the AegisSQL user.

  3. Open the PLCGateway\EFSQLScripts folder and open the SQL script.

  4. Run the SQL script against the new database created in the previous step.

Create the ASP.NET Core service

  1. Open PowerShell ISE.

  2. Edit the service creation script with the following values for your environment:

  3. Execute the script. The service will be created.

$exeFolder = "C:\Program Files (x86)\Aegis\PLCGateway\"
$exePath = "C:\Program Files (x86)\Aegis\PLCGateway\Aegis.CFX.Gateway.Web.Server.exe"
$userName = "[ComputerNameOrDomain]\[UserName]"
$serviceName = "Aegis PLC Gateway Service"


Note

If you receive an error stating that scripts cannot run, use the Set-ExecutionPolicy command to adjust the execution policy to allow scripts.

Appsettings.json configuration

Edit appsettings.json in the PLCGateway folder, replacing all bracketed placeholders with actual values for your environment.

Setting

Value format

ConnectionStrings.DefaultConnection

Server=[DB Server];Database=[DB Name];MultipleActiveResultSets=True;User Id=[Username];Password=[Password];

Kestrel.Http.Url

http://[PLCCFXGatewayServer]:5250

Kestrel.HttpsInlineCertFile.Url

https://[PLCCFXGatewayServer]:5251