WSHttpBindingBase.HostNameComparisonMode 属性

定义

获取或设置一个值,该值指示在对 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 进行匹配时,是否使用主机名来访问服务。 默认值为 StrongWildcard,表示忽略匹配项中的主机名。

示例

此示例演示如何获取 HostNameComparisonMode 值。

HostNameComparisonMode hostnameComparisonMode =
binding1.HostNameComparisonMode;
Dim hostnameComparisonMode As HostNameComparisonMode = binding1.HostNameComparisonMode

适用于