Share via


WebHttpBindingElement.BypassProxyOnLocal 屬性

定義

取得或設定值,這個值表示是否略過 Proxy 伺服器而改用本機位址。

public:
 property bool BypassProxyOnLocal { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("bypassProxyOnLocal", DefaultValue=false)]
public bool BypassProxyOnLocal { get; set; }
[<System.Configuration.ConfigurationProperty("bypassProxyOnLocal", DefaultValue=false)>]
member this.BypassProxyOnLocal : bool with get, set
Public Property BypassProxyOnLocal As Boolean

屬性值

Boolean

true 表示略過 Proxy 伺服器而改用本機位址,否則為 false。 預設值是 false

屬性

備註

如果網際網路資源有本機位址,則此資源為本機資源。 本機位址是位於同一部電腦上的本機區域網路或內部網路,在語法上是因為缺少句點 (。 ) 與 Uri 和中的相同。 http://webserver/ http://localhost/

設定 BypassProxyOnLocal 屬性即可決定以 WebHttpBindingElement 設定的端點在存取本機資源時,是否使用 Proxy 伺服器。

BypassProxyOnLocaltrue,則對於本機網際網路資源的要求不會使用 Proxy 伺服器。 若 BypassProxyOnLocalfalse,則所有的網際網路要求都會經過 Proxy 伺服器。

適用於