HttpTransportBindingElement.BypassProxyOnLocal 屬性

定義

取得或設定值,指出是否忽略本機位址的 Proxy。

public:
 property bool BypassProxyOnLocal { bool get(); void set(bool value); };
public bool BypassProxyOnLocal { get; set; }
member this.BypassProxyOnLocal : bool with get, set
Public Property BypassProxyOnLocal As Boolean

屬性值

如果忽略本機位址的 Proxy,則為 true,否則為 false。 預設為 false

範例

下列範例會將這個屬性設定為在對繫結執行要求時使用。

HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();  
httpBinding.BypassProxyOnLocal = true;  

備註

本機位址是位於本機 LAN 或內部網路上的位址。

如果服務位址以 開頭 http://localhost ,WCF 一律會忽略 Proxy。 如果您希望用戶端在與相同電腦上的服務進行交談時通過 Proxy,應使用主機名稱 (而非 localhost)。

適用於