You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to update server information to the configured endpoint using the UpdateFromServer method, it returns the first entry with the matching security settings.
For e.g. Let's assume the configured endpoint on the client is opc.tcp://hostname:234[None:None:Binary].
The server exposes 2 endpoints
opc.tcp://hostname:123[None:None:Binary]
opc.tcp://hostname:234[None:None:Binary]
In this case, on calling the UpdateFromServer on the configured endpoint entry, the endpoint configuration for the endpoint opc.tcp://hostname:123[None:None:Binary] is returned instead.
Expected Behavior
Since the configured endpoint is opc.tcp://hostname:234[None:None:Binary], the server configuration for the same should have been returned. This is expected because the endpoint with the exact same url and security setting is exposed on the server.
We want to setup the sample test server where there are two separate endpoints for anonymous and the other authentication settings. Reference Server is used as the test server and the port number-based restrictions are made in the code so that an appropriate message is sent(e.g. BadSecurityPolicyRejected) when trying to connect to the server using the restricted endpoint url. Although through UAExpert the message was displayed correctly for the restricted port, the bug was encountered when testing this scenario with our UA client as it was still able to connect to the server successfully even with the restricted port.
Our client uses the UpdateFromServer method to update the server configuration for the configured endpoint which returns the incorrect endpoint.
Steps To Reproduce
This bug can be reproduced using the Reference Server and the Datatypes Server sample OPC UA servers.
For the purpose of testing the scenario, we use the Reference Client.
Configure 2 endpoints for the Reference Server e.g. opc.tcp://host:62541/Quickstarts/ReferenceServer and opc.tcp://host:62542/Quickstarts/ReferenceServer
Run the server.
In the Program.cs of the ConsoleReferenceClient project, configure the server endpoint as opc.tcp://host:62542/Quickstarts/ReferenceServer
In ConnectAsync method in the UAClient.cs of the ConsoleReferenceClient project, add the code "endpoint.UpdateFromServer();".
Run the Client and check the endpoint updated after this point. It shows opc.tcp://host:62541/Quickstarts/ReferenceServer instead of the endpoint that was requested.
The method returns the first url (based on the port number).
Environment
- OS: Windows 11 Enterprise
- Environment: Visual Studio 2022 17.11.5
- Runtime: .NET 8.0
- Nuget Version: Source Code taken from branch UA-.NETStandard-1.05.04-final-release-fixes
- Component:Opc.Ua.Core
- Server: Reference Server
- Client: Reference Client
Anything else?
The text was updated successfully, but these errors were encountered:
Type of issue
Current Behavior
When trying to update server information to the configured endpoint using the UpdateFromServer method, it returns the first entry with the matching security settings.
For e.g. Let's assume the configured endpoint on the client is opc.tcp://hostname:234[None:None:Binary].
The server exposes 2 endpoints
In this case, on calling the UpdateFromServer on the configured endpoint entry, the endpoint configuration for the endpoint opc.tcp://hostname:123[None:None:Binary] is returned instead.
Expected Behavior
Since the configured endpoint is opc.tcp://hostname:234[None:None:Binary], the server configuration for the same should have been returned. This is expected because the endpoint with the exact same url and security setting is exposed on the server.
We want to setup the sample test server where there are two separate endpoints for anonymous and the other authentication settings. Reference Server is used as the test server and the port number-based restrictions are made in the code so that an appropriate message is sent(e.g. BadSecurityPolicyRejected) when trying to connect to the server using the restricted endpoint url. Although through UAExpert the message was displayed correctly for the restricted port, the bug was encountered when testing this scenario with our UA client as it was still able to connect to the server successfully even with the restricted port.
Our client uses the UpdateFromServer method to update the server configuration for the configured endpoint which returns the incorrect endpoint.
Steps To Reproduce
This bug can be reproduced using the Reference Server and the Datatypes Server sample OPC UA servers.
For the purpose of testing the scenario, we use the Reference Client.
Run the server.
The method returns the first url (based on the port number).
Environment
Anything else?
The text was updated successfully, but these errors were encountered: