Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
property bool BypassProxyOnLocal {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

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.

The following example sets this property to use when performing requests on the binding.

[C#]

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

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft