OPC Studio User's Guide and Reference
HostNames Property (_EasyUAApplication)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Application.ComTypes Namespace > _EasyUAApplication Interface : HostNames Property
A collection of host names for the application instance.
Syntax
'Declaration
 
<NotNullAttribute()>
ReadOnly Property HostNames As StringCollection
'Usage
 
Dim instance As _EasyUAApplication
Dim value As StringCollection
 
value = instance.HostNames
[NotNull()]
StringCollection HostNames {get;}
[NotNull()]
property StringCollection^ HostNames {
   StringCollection^ get();
}

Property Value

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

The individual elements of the property value cannot be null (Nothing in Visual Basic).

Remarks

The getter method of this property is pure, i.e. it does not have observable side effects.

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

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."

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

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