NetTcpBinding.HostNameComparisonMode 属性

定义

获取或设置一个值,该值指示在对 URI 进行匹配时,是否使用主机名来访问服务。Gets or sets a value that indicates whether the hostname is used to reach the service when matching the URI.

public:
 property System::ServiceModel::HostNameComparisonMode HostNameComparisonMode { System::ServiceModel::HostNameComparisonMode get(); void set(System::ServiceModel::HostNameComparisonMode value); };
public System.ServiceModel.HostNameComparisonMode HostNameComparisonMode { get; set; }
member this.HostNameComparisonMode : System.ServiceModel.HostNameComparisonMode with get, set
Public Property HostNameComparisonMode As HostNameComparisonMode

属性值

HostNameComparisonMode 值之一,指示在对 URI 进行匹配时,是否使用主机名来访问服务。One of the HostNameComparisonMode values that indicates whether the hostname is used to reach the service when matching the URI. 默认值为 StrongWildcard,表示忽略匹配项中的主机名。The default value is StrongWildcard, which ignores the hostname in the match.

示例

此示例演示如何获取 HostNameComparisonMode 值。This example shows how to get the HostNameComparisonMode value.

HostNameComparisonMode hostNameComparisonMode = binding.HostNameComparisonMode;

适用于