HttpTransportBindingElement.BypassProxyOnLocal Property

Gets or sets a value that indicates whether proxies are ignored for local addresses.

Namespace: System.ServiceModel.Channels
Assembly: System.ServiceModel (in system.servicemodel.dll)

public bool BypassProxyOnLocal { get; set; }
/** @property */
public boolean get_BypassProxyOnLocal ()

/** @property */
public void set_BypassProxyOnLocal (boolean value)

public function get BypassProxyOnLocal () : boolean

public function set BypassProxyOnLocal (value : boolean)

Not applicable.

Property Value

true if proxies are ignored for local addresses; otherwise, false. The default is false.

A local address is one that is on the local LAN or intranet.

WCF always ignores the proxy if the service address begins with http://localhost. You should use the host name (rather than localhost) if you want clients to go through a proxy when talking to services on the same machine.

[C#] The following example sets this property to use when performing requests on the binding.

HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();

httpBinding.BypassProxyOnLocal = true;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions