.NET Based OPC UA Client/Server SDK

Deploying the final application

To finalize the application you must make sure that your OPC UA application has a configuration and all identification information is set correctly. Especially when your development is based on one of the examples shipped with the SDK, you must make sure to remove Unified Automation company branding and replace with yours.

Replace company identification and product name:

  • must set correct OPC UA ProductURI and ApplicationURI
  • must set correct defaults for application certificate content
  • should set correct paths for trace files
  • should set correct paths for certificates

At a prominent place (e.g. readme or documentation or about box) in your deployment 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 (example):

  • This software uses/is based on Unified Automation .NET based OPC UA SDK. Copyright (C) 2007-2021 Unified Automation GmbH. All rights reserved.
  • This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). Copyright (C) 1995-1998 Eric Young (eay@c.nosp@m.rypt.nosp@m.soft..nosp@m.com) All rights reserved.

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, or other. To install your application build with the .NET based OPC UA SDK on the target machine, your setup should consider the following:

Check requirements:

  • have admin rights for installation (copy/create files, configure firewall, strengthen file permissions)
  • need Microsoft .NET Framework 3.5 SP1, 4.0 SP1, 4.5, 4.8 or .NET Core 2.1, .NET Core 3.1 or later on the target.
If your application is built against .NET Framework 3.5 SP1, the same version has to be installed on the target machine. Applications that are built against .NET framework 4.0 SP1 will run on machines with .NET Framework 4.0 or later. Applications that are built against .NET framework 4.5 will run on machines with .NET Framework 4.5 or later. Applications that are built against .NET framework 4.8 are requiring machines with .NET Framework 4.8 or later. Applications built agains .NET Core 2.1 are requiring .NET Core 2.1 or later. Applications built agains .NET Core 3.1 are requiring .NET Core 3.1 or later.

Install your .NET Framework application to the target directory:

  • MyApplication.exe
  • MyApplication.exe.config

    Alternative when using embedded ressource:
  • MyUaApplication.exe (includes config as embedded ressource or in memory)

Install your .NET Core application to the target directory:

  • MyApplication.dll and / or MyApplication.exe

For .NET Framework or .NET Core applications that are not nativly compiled, it is required to install the UnifiedAutomation assemblies.

It is not allowed to install UnifiedAutomation assemblies if .NET Core / UWP applications that are natively compiled.

Install UA SDK Assemblies next to your executable:

  • UnifiedAutomation.UaBase.dll
  • UnifiedAutomation.UaClient.dll (if client functionality is used)
  • UnifiedAutomation.UaServer.dll (if server functionality is used)
  • UnifiedAutomation.UaBase.Windows.dll (optional for .NET Framework, if ApplicationInstance is used)
  • Opc.Ua.CertificateGenerator.exe (used by the UaBase.Windows.dll to generate certificates)
  • UnifiedAutomation.UaBase.BouncyCastle.dll (optional, if BouncyCastle is used to generate the ApplicationInstance certificate)
  • Required third party assemblies
Keep in mind to install the Assemblies for the correct version of .NET Framework.
Do not install the Unified Automation SDK Assemblies to the Global Assembly Cache (GAC), this may cause version conflicts with other applications running on this target, side-by-side installation is recommended.

Certificate creation and startup procedure

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 privet key file location. After certificates are created the application will use them according to the OPC UA security concepts.

Additional Deliverables and Utilities (LDS and LDSme):

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.

Only if you are absolutely sure to be the only OPC UA Server on the particular target, you are allowed to run your application on TCP-Port 4840. However, on PC based targets multiple OPC UA Server applications can exist and run simultaneously. In that case you should install local discovery service and run LDS on TCP Port 4840. All local UA Servers should register with the LDS.