OPC Studio User's Guide and Reference
HostNamesString Property (UAClientServerApplicationParameters)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Engine Namespace > UAClientServerApplicationParameters Class : HostNamesString Property
A comma-separated list of host names for the application instance.
Syntax
'Declaration
 
<DataMemberAttribute()>
<JetBrains.Annotations.NotNullAttribute()>
Public Property HostNamesString As String
'Usage
 
Dim instance As UAClientServerApplicationParameters
Dim value As String
 
instance.HostNamesString = value
 
value = instance.HostNamesString
[DataMember()]
[JetBrains.Annotations.NotNull()]
public string HostNamesString {get; set;}
[DataMember()]
[JetBrains.Annotations.NotNull()]
public:
property String^ HostNamesString {
   String^ get();
   void set (    String^ value);
}

Property Value

The value of this property cannot be null (Nothing in Visual Basic).

The default value of this property is "" (String.Empty).

Remarks

This string is a comma-separated list of host names in the HostNames collection.

This property can be used to specify host names that clients should be able to use when addressing the server, and will be used instead of those contained explicitly in any server endpoint URL. The host names from this property are merged with host names from the application level (either HostNames, or the default host names if HostNames is empty).

The resulting (effective) host names are stored into the server application certificate, when the OPC UA server component creates its own application certificate automatically. If your application contains multiple servers sharing the same host names, it is recommended that you keep this property empty, and rather set the host names on the application level.

Host names are only relevant for servers.

When no host names are specified, the component uses default host names instead. For server applications, the default host names consist of known DNS and NetBIOS names and IPv4 and IPv6 addresses of the local host. For applications that are not servers, the default host names are empty.

The host names come into play in following situations:

From UA-.NETStandard comments: "These list the alternate host names (via firewalls, multiple NICs etc.) that can be used to communicate with the server. The URL used by the client when calling FindServers/GetEndpoints or CreateSession will be used to filter the list of endpoints returned by checking for alternate host names that match the domain in the URL provided by the client.
Note that any additional domains should be listed in the server's certificate. If they are left out the client make refuse to connect because it has no way to know if the alternate domain was authorized by the server administrator."

From OPC UA specification: "Servers shall specify a partial or a fully qualified dNSName or a static IPAddress which identifies the machine where the application Instance runs. Additional dNSNames may be specified if the machine has multiple names."

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also