Get client network address

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

Moderator: uasdknet

Post Reply
a.hoettgen
Jr. Member
Jr. Member
Posts: 1
Joined: 19 Oct 2020, 15:47

Get client network address

Post by a.hoettgen »

Hi,

is there a way to read the network address of a client when he calls an action on the server, e. g. a method call? I have seen the post 'Getting Client IP from UaSession?' (https://forum.unified-automation.com/post3277.html), but have not found an equivalent for .NET.

Best regards

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

Re: Get client network address

Post by Support Team »

Hi,

the hostname or IP is used in OPC UA certificates for identifying/validation if the caller really matches the certificate.

Eventhough not knowing what you exactly want to do, it seems NOT a good idea to identify callers of UA Methods by their IP address, that would be totally wrong from an OPC UA perspective.

In UA we have Authentication and Autorisation mechanizms that are standard conform and should be used. If you want to identify a Client, there is the session (including sessionID), and on the individual Node (UA Method) in the server you can even have additional user access rights (including role based permissions).
Best regards
Unified Automation Support Team

Post Reply