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?