URL not found error for the server's endpoints due to /

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

Moderator: uasdknet

Post Reply
jonathang
Hero Member
Hero Member
Posts: 32
Joined: 02 Nov 2015, 19:07

URL not found error for the server's endpoints due to /

Post by jonathang »

Dear Support Team,

We wrote an OPC UA Server using Unified Automation .NET Server SDK version 2.5.6 (.NET Framework 4.6.1) that is running on a publicly visible server.
When trying to connect to the server with UaExpert (1.4.4) and the public URL, we get the following error:
URL not found
There was no exact match for the specified URL in the server's endpoints, using the first server certificate found for connecting.
After closing the error message, everything works fine and we connect to the OPC UA Server.

The problem appears to be the absence of a slash (/) at the end ofthe URL.
[url]opc.tcp://<our-domain-here>:4840/[/url] Works
[url]opc.tcp://<our-domain-here>:4840[/url] Gives "URL not found" error

The config file does not have a slash at the end of the endpoint.

We also noticed the same "issue" when running at localhost. The endpoint in the config file has no / at the end while the endpoint printed out by the server does.

Where does the slash come from?
Is there a way to make the connection work with or without the slash without errors/warnings?

I found this on the OPC Foundation's github page. Looks like this might be a .NET issue:
https://github.com/OPCFoundation/UA-.NET/issues/35


Sincerely,

Jonathan

User avatar
Support Team
Hero Member
Hero Member
Posts: 3071
Joined: 18 Mar 2011, 15:09

Re: URL not found error for the server's endpoints due to /

Post by Support Team »

Hello,

We are using the UriBuilder class of the .NET framework. This class appends the slash.

In the configuration you can specify an base address. This address is not the endpoint url of the server, but the endpoint urls of the endpoints are based on the base address.
If the client calls GetEndpoints, the server returns endpoints having an EndpointUrl with the slash. If on of these endpoints is used for calling connect, the connect succeeds without a warning. If the endpoint is entered directly or modified, the warning is raised.
Best regards
Unified Automation Support Team

Post Reply