AMT Help Files

Installing OpCon Service

Prerequisites

The ASP.NET 6.* Hosting Bundle is required for the OpCon service.

 

Adding OpCon service to the Control Center

To install the AMT OpCon service in an AMT Environment, an entry must be added to the Own Services section. This section can be found in the System Configuration -> Services -> Own services tab of the Control Center.  




In this tab click on the Add button to add an Own service, in this case the OpCon Service. Enter the required information in the opened install window according to the shown example.



 

Installing the OpCon service as a Window System service

Selecting the Opcon service and then clicking the (De)Installation option will open the Dialog shown below. The OpCon service can now be installed as a Window System Service by clicking the 'Install service' button. Note that this option will only work if a login account with correct security rights has been added to the Login accounts in the ControlCenter.



Configuring the OpCon service

After having installed the OpCon service it needs to be configured before it can be started.

The configuration settings need to be set in a file named appsettings.json in the AmtTools\OpCon folder of your AMT environment.

A sample file named SAMPLE_appsettings.json is located in the OpCon folder, copy and rename this file to appsettings.json and open it in a text editor like Notepad.

Depending on which protocol will be used (HTTP or HTTPS) different settings should be used in the appsetting.json file.

 

HTTP

To connect to the Amt OpCon service via the HTTP protocol, the following settings should be set in the appsettings.json file:

 {
   "Kestrel": {
     "Endpoints": {
       "HttpEndpoint": { 
         "Url": "http://<server>:<Port>"
       }
     }
   },
   "Amt": {
     "LogSeverity": "Debug",
     "DefaultAppName": "DEMO2"
   }
}

 

 

HTTPS

To be able to connect to the AMT OpCon service using HTTPS, an SSL/TLS certificate must be configured in the appsettings.json file.

There are a multiple ways to configure the loading of an certificate in the settings file:
Loading from a certificate store (Recommended), loading from a .pfx file with password or loading a .pem/.crt and key file with password.

Settings for the first two methods are commented out in the sample settings file.

Only one method to load the certificate should be configured in the settings file.

 

On this page the recommended method will be described, the loading from a certificate store.
 
For more information about the other methods see the following external Microsoft learn page:
Configure endpoints for the ASP.NET Core Kestrel web server 

 

Loading from a certificate store

After purchasing or creating an X.509 (SSL/TLS) certificate, it can be imported in the windows local system by running certlm.msc and importing the certificate in a store (e.g. Web Hosting or Personal).

When successfully imported, the certificate can be double clicked to display its fields under the 'Details' tab. The subject of the certificate is needed for the next step.

 

To connect to the AMT OpCon service via the HTTPS protocol, the following settings should be uncommented and set in the appsettings.json file:

{
   "Kestrel": {
     "Endpoints": {
       "HttpsEndpoint": { 
         "Url": "https://<server>:<Port>",
         "Certificate": {
           "Subject": "amtserver.example.com",
           "Store": "webhosting",
           "Location": "LocalMachine"
         }
       }
     }
   },
   "Amt": {
     "LogSeverity": "Debug",
     "DefaultAppName": "DEMO2",
     "HttpRedirection": true
   },
   "https_port": <HTTPS_Port>
}

 

 

HTTP and HTTPS can both be enabled if they use different ports, in which case HttpRedirection should be disabled.

 

It is not recommended to use a Self-Signed certificate in production environments.
To use Self-Signed certificates, a setting needs to be added to the Certificate section: "AllowInvalid": "true"

 

Starting/Stopping the OpCon service

The OpCon service can be started or stopped in the Server Control page of the Control Center.

 

Healthprobe for load balancers

A health-probe had been build in the OpCon Service which returns a HTTP 200 status (OK). This can be used for (Azure) load balancers and other services to determine if the Service is running. This health-probe can be reached at <Url>/healthprobe (e.g. http://nb1128:9000/healthprobe ).

 

Status page

A status page of the OpCon service is available from the 'Server control' page in the Control Center. When selecting the OpCon Service own service node, the tab 'Status' can be selected to display the current status of the Service. The status page can also be reached outside of the Control Center by entering the BaseAddress url of the OpCon Service into a browser.

 

Authorization

The OpCon connector needs to logon with a valid user. The User /password must exist or have been created in the control center already. In the SMA OpCon connector these must be set in the AMT_USER and AMT_USER_PASSWORD settings.

Note: If windows authentication is used in the control center/application center, no password will be set for the users automatically. A password must be set manually for the user intended to be used for the OpCon connecter.