Login  •  Register


UaModeler createt App doesn't call OnRootNodeManagerStarted

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

UaModeler createt App doesn't call OnRootNodeManagerStarted

Postby VKuhnle » 10 Jul 2019, 14:07

I developped a Test Server using UaModeler, but it failes to call OnRootNodeManagerStarted
SDK Version: 3.0.0

program.cs:
class Program
{
static void Main(string[] args)
{
try
{
var assembly = PlatformUtils.GetAssembly(typeof(Program));
ApplicationLicenseManager.AddProcessLicenses(assembly, "License.lic");

// Start the server.
var server = new TestServerManager();
ApplicationInstanceBase application = ApplicationInstance.Default;

application.AutoCreateCertificate = true;
--> application.Start(server, null, server); // Throws Exception

Console.WriteLine("Endpoint URL: opc.tcp://localhost:48030");
// Block until the server exits.
Console.WriteLine("Press <enter> to exit the program.");
Console.ReadLine();
// Stop the server.
server.Stop();
}
catch (Exception e)
{
Console.WriteLine("ERROR: {0}", e.Message);
Console.WriteLine("Press <enter> to exit the program.");
Console.ReadLine();
}
}
}
}

EXCEPTION:
Code: Select all
ERROR: Server configuration does not have any endpoints defined.
Parametername: application
Press <enter> to exit the program.



TestServerManager
using UnifiedAutomation.UaServer;

namespace MyCompany.MyServer
{
internal class TestServerManager : ServerManager
{
public TestServerManager()
{
}

protected override void OnRootNodeManagerStarted(RootNodeManager nodeManager)
{
UnifiedAutomation.UaServer.BaseNodeManager nm; // Breakpoint never reached / function called...
nm = new MyServerNodeManager(this);
nm.Startup();
}
}
}

What is missing in my project? :-[
VKuhnle
Jr. Member
Jr. Member
 
Posts: 3
Joined: 27 Jun 2019, 10:51

Return to .NET based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 1 guest

cron