System.Net.WebProxy.BypassProxyOnLocal Property

Gets or sets a value that indicates whether to bypass the proxy server for local addresses.

Syntax

public bool BypassProxyOnLocal { get; set; }

Value

true to bypass the proxy server for local resources; otherwise, false. The default value is false.

Remarks

The setting of the WebProxy.BypassProxyOnLocal property determines whether System.Net.WebRequest instances use the proxy server when accessing local Internet resources.

If WebProxy.BypassProxyOnLocal is true, requests to local Internet resources do not use the proxy server. Local requests are identified by the lack of a period (.) in the URI, as in http://webserver/, or access the local server, including http://localhost, http://loopback, or http://127.0.0.1. When WebProxy.BypassProxyOnLocal is false, all Internet requests are made through the proxy server.

Note:

Requests to a local host with a URI that contain a period use the proxy. To avoid using a proxy in these cases, create an entry for the host in the WebProxy.BypassList.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0