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 ...

Moderator: uasdknet

Post Reply
VKuhnle
Jr. Member
Jr. Member
Posts: 3
Joined: 27 Jun 2019, 10:51

UaModeler createt App doesn't call OnRootNodeManagerStarted

Post by VKuhnle »

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? :-[

Post Reply