OPC Studio User's Guide and Reference
AlternateHostNamesString Property



OpcLabs.ServerOpcUA Assembly > OpcLabs.EasyOpc.UA Namespace > EasyUAServerCore Class : AlternateHostNamesString Property
A comma-separated list of alternate host names for the application instance.
Syntax
'Declaration
 
<DataMemberAttribute()>
<NotNullAttribute()>
Public Property AlternateHostNamesString As String
'Usage
 
Dim instance As EasyUAServerCore
Dim value As String
 
instance.AlternateHostNamesString = value
 
value = instance.AlternateHostNamesString
[DataMember()]
[NotNull()]
public string AlternateHostNamesString {get; set;}
[DataMember()]
[NotNull()]
public:
property String^ AlternateHostNamesString {
   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).

Exceptions
ExceptionDescription

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

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

This property can be used to specify host names that clients should be able to use when addressing the server, and that are not contained explicitly in any server endpoint URL. The host names from this property are merged with host names from the application level (either OpcLabs.EasyOpc.UA.Engine.UAClientServerApplicationParameters.HostNames, or the default host names if OpcLabs.EasyOpc.UA.Engine.UAClientServerApplicationParameters.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.

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