The Professional Edition includes a version of the .NET4 DANSrv generic server that works with the uaPLUS generic server DLL to allow parallel access from OPC DA and OPC UA clients.
UA capability is added by including the uaPLUS.Net4.dll.
A license of the uaPLUS server toolkit is required in addition to the DANSrv license. |
![]() |
Steps to add UA capability
- Use the generic server DANSrvUaNet4.exe instead of DANSrvNet4.exe
Copy it manually into your project or modify the PostBuildNet4.bat file.
- Download the Advosol uaPLUS server toolkit and install it
- Copy the file uaPLUSdll.Net4.DLL to the executables directory of your OPC DA server project
- Copy the uaPLUS-DA license file to the executables directory
Without the license file uaPLUS works in evaluation mode for only 30 minutes at a time.
- Create the DANSrvUaNet4.Ua.Config.Xml UA configuration file
Drag the DANSrvUaNet4.exe file to the uaPUS UaServerConfiogHelper utility desktop icon and create and/or edit the configuration, including creating the UA server certificate and importing the client certificates.
Read the uaPLUS documentation for details. Especially the required certificate exchange happens to cause difficulties.
- A minor modification may be required in existing NSPlugin.dll implementations for them to work with DANSrvUaNet4.exe
Add the following class definitions in the NSPlugin namespace
public partial class EventAreaBrowser
{
}public partial class EventArea
{
}public partial class AlarmEventServer
{
}public partial class EventSubscription
{
}
Sample Server with UA Capability
Study and test the CSsamplePropUA sample server project.
It contains the needed UA configuration file. However, you still need to use the UaServerConfigHelper utility to create a UA server certificate for this machine.
Server Execution
The DANSrvUaNet4.exe needs to be started manually or by a connecting OPC DA client before any UA client can access the server. UA doesn't automatically start the sever on connect as DCOM does.
The DANSrvUaNet4.exe server keeps running after the clients disconnected. The process needs to be terminated manually or from the NSPluginNet4.dll code.
The server can be registered to run as a Windows service by executing:
DANSrvUaNet4.exe /Service /AutoStart
Executing DANSrvUaNet4.exe /UnregServer unregisters the server and stops/deletes the Windows service if registered as such.
UA Test Clients
Test clients with UA capability are provided in the Tools\UA setup subdirectory.
The UaClientConfigHelper utility is in the same directory. It need to be used to create a certificate for the client applications.
A server/client certificate exchange is not required as long as server and client run on the same machine.