共用方式為


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

HostNameComparisonMode 值,指出在比對 URI 時此主機名稱是否會用來取用服務。 預設值為 StrongWildcard,表示比對時忽略主機名稱。

範例

下列範例會示範如何在組態檔中指定 wsDualHttpBinding 繫結。

// Set to StrongWildCard
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
' Set to StrongWildCard
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard

適用於