New version of OPC Foundation C# SDK (1.5.378.65)

I had created a couple of years ago a C# client that changes several tags every minute or so; I had to update my computer and I updated to VS 2026, .NET 10.0 and I am using the latest version of the OPC Foundation C# library (1.5.378.65).

Apparently, there have been many changes regarding the async ways in which all functions are now implemented; but the main problem is that now I am not able to stablish no connection to Ignition OPC UA server.

I have disabled the Security Policies to “None” and I create the session with an Anonymous connection, but still when debugging I have a Connection Error: [80AE0000] 'Remote side closed connection'.

Here is the code for the configuration:

try
{
// 1. Discovery remains the same
using var discoveryClient = await DiscoveryClient.CreateAsync(new Uri(url), null);
var endpoints = await discoveryClient.GetEndpointsAsync(null);

try{
var discoveryClient = await DiscoveryClient.CreateAsync(new Uri(url), null);
var endpoints = await discoveryClient.GetEndpointsAsync(null);

var endpointDescription = SelectEndpoint(endpoints, false);
var endpoint = new ConfiguredEndpoint(null, endpointDescription, EndpointConfiguration.Create(config));

// 2. DIRECT SESSION CREATION (Fixes CS0246 & CS0120)
// We use the 8-parameter overload which is the modern non-obsolete standard
var session = await Session.Create(
    config,                                  // 1. ApplicationConfiguration
    endpoint,                                // 2. ConfiguredEndpoint
    false,                                   // 4. bool checkDomain
    "MachineSession",                        // 5. string sessionName
    60000,                                   // 6. uint sessionTimeout
    new UserIdentity(new AnonymousIdentityToken()), // 7. IUserIdentity
    null,
    CancellationToken.None                   // 8. CancellationToken (MANDATORY)
);

Console.WriteLine("Connected!");

var rng = new Random();
while (true)
{
    var val = new WriteValue
    {
        NodeId = nodeId,
        AttributeId = Attributes.Value,
        Value = new DataValue(new Variant((ushort)rng.Next(0, 100)))
    };
    // Use WriteAsync as required by modern standards
    await session.WriteAsync(null, new WriteValueCollection { val }, CancellationToken.None);
    await Task.Delay(2000);
}

}
catch (Exception ex) { Console.WriteLine($"Connection Error: {ex.Message}"); }

Anything in the Ignition logs?

Might help to get a Wireshark capture and see what's going on there too.

I get the following in the Ignition Diagnostics Logs.

org.eclipse.milo.opcua.stack.core.UaException: no matching endpoint found: transportProfile=TCP_UASC_UABINARY, endpointUrl=opc.tcp://localhost:62541/, securityPolicy=None, securityMode=None
at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerAsymmetricHandler.lambda$openSecureChannel$5(UascServerAsymmetricHandler.java:454)
at java.base/java.util.Optional.orElseThrow(Unknown Source)
at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerAsymmetricHandler.openSecureChannel(UascServerAsymmetricHandler.java:444)
at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerAsymmetricHandler.lambda$sendOpenSecureChannelResponse$3(UascServerAsymmetricHandler.java:355)
at org.eclipse.milo.opcua.stack.core.channel.SerializationQueue.lambda$encode$0(SerializationQueue.java:59)
at org.eclipse.milo.opcua.stack.core.util.TaskQueue$TaskWrapper.run(TaskQueue.java:273)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

What are the Ignition OPC UA server settings you have? Did you restart after changing them?