.NET Based OPC UA Client/Server SDK
3.3.1.531
|
To finalize the application you have to make sure that your OPC UA application has a configuration and all identification information is set correctly. In particular, if your development is based on one of the examples provided with the SDK, you need to make sure that you remove the Unified Automation company branding and replace it with your own.
Replace company identification and product name:
ProductURI
and ApplicationURI
At a prominent place in your deployment (e.g. readme or documentation or about box) you must give correct copyright notice for the use of third party components your application makes use of. For details which third party components are used by the SDK, check out the appendix A of Unified Automation Software License Agreement.
Add copyright and license attribution (examples!):
For good end user experience you should simplify installation of the final application. You will typically preinstall on the target device or you will create a setup procedure using some comfortable installer (e.g. MSI-Installer, InstallShield, Nullsoft NSIS, WIX Toolset, etc.).
To install your application on the target machine, your setup should consider the following requirements:
Required Permissions
To install the application it needs administrative rights for e.g. copy/create files, configure firewall, strengthen file permissions, etc.
Required Installed .NET Version
The following .NET versions must be installed on the target machine, depending on which version your application was built with:
Application is build with | Required .NET version on the machine |
---|---|
.NET Framework 3.5 SP1 | .NET Framework 3.5 SP1 |
.NET Framework 4.0 SP1 | .NET Framework 4.0 or later. |
.NET Framework 4.5 | .NET Framework 4.5 or later. |
.NET Framework 4.8 | .NET Framework 4.8 or later. |
.NET Core 2.1 | .NET Core 2.1 or later. |
.NET Core 3.1 | .NET Core 3.1 or later. |
.NET 6.0 | .NET 6.0 or later. |
Required Files
For a .NET Framework application at least the executable must be installed. If the application is configured with a separate config file it must be placed to the same folder.
For example:
MyApplication.exe
MyApplication.exe.config
For a .NET Core application you can deploy your application as a library or executable.
For example:
Alternatively you can configure your application in memory or include the config file as embedded resource. Then only the executable needs to be installed.
With regard to the loading sequence of different configurations, consider Differences in Configuration
If the application is not natively compiled it is necessary to install the following SDK assemblies alongside your executable:
Assembly to deploy | Remark |
---|---|
UnifiedAutomation.UaBase.dll | |
UnifiedAutomation.UaClient.dll | If client functionality is used |
UnifiedAutomation.UaServer.dll | If server functionality is used |
UnifiedAutomation.UaBase.Windows.dll | If ApplicationInstance is used in a .NET Framework and .NET 6.0 (Windows only) application |
Opc.Ua.CertificateGenerator.exe | If UaBase.Windows.dll is used to generate certificates |
UnifiedAutomation.UaBase.BouncyCastle.dll | If BouncyCastle is used to generate the ApplicationInstance certificate |
other third party assemblies | If used in the application |
On first start up of the installed application the OPC UA SDK creates self-signed application instance certificate. In order to do so the application must have access permissions on the certificate file store location. Especially the private key file is a secret you must protect against unauthorized access, copying or theft. Make sure you set restrictive access permissions on the private key file location. After certificates are created the application will use them according to the OPC UA security concepts.
The OPC Foundation provides additional tools for Local Discovery Services (LDS) which you may want to ship with your application. You must obtain such tools and their respective merge module setups from the OPC Foundation directly. Refer to the documentation of such tools for proper integration into your installer.
Deploying a .NET Framework application built with the OPC UA .NET SDK requires two steps:
The latter step will create the certificate, create the Windows Service (if required) and set the file permissions correctly. For servers, the installation process will also open firewall ports.
The configuration file that controls the installation process can be passed as a command line parameter or the information can be stored in the default configuration file for the application.
The install process is described in more detail below.
Deploying a .NET Core application built with the OPC UA .NET SDK requires four steps:
The following table lists the files that need to be copied for a simple client application bulit with .NET Framework:
File | Description |
---|---|
FullClient.exe | The executable assembly created by the application developer. |
UnifiedAutomation.UaClient.dll | The assembly for the Unified Automation .NET Client SDK. |
UnifiedAutomation.UaBase.dll | The base assembly for the Unified Automation .NET SDKs. |
UnifiedAutomation.UaBase.Windows.dll | An assembly with toolikt functionaliy for installation process. |
Opc.Ua.CertificateGenerator.exe | A certificate generation utility. |
Interop.NetFwTypeLib.dll | An Interop assembly used to access the Windows Firewall APIs. |
The Opc.Ua.CertificateGenerator.exe utility is only required for installation. It is not required once an application is configured or if certificates are assigned using some vendor defined mechanism.
If the SDK development environment is installed on a machine the Opc.Ua.CertificateGenerator.exe utility can be found in the installation directory under “UnifiedAutomation\UaSdkNetBundleBinary\bin”.
The following table lists the files that need to be copied for a simple client application bulit with .NET Core:
File | Description |
---|---|
Client.dll | The executable assembly created by the application developer. |
UnifiedAutomation.UaClient.dll | The assembly for the Unified Automation .NET Client SDK. |
UnifiedAutomation.UaBase.dll | The base assembly for the Unified Automation .NET SDKs. |
UnifiedAutomation.UaBase.BouncyCastle.dll | An assembly calling BouncyCastle to create the certificate. |
BouncyCastle.Crypto.dll | Third party library used by UnifiedAutomation.UaBase.BouncyCastle.dll. |
Client.runtimeconfig.json | File containing runtime dependencies. |