System.Net.WebProxy.IsBypassed Method

Indicates whether to use the proxy server for the specified host.

Syntax

public bool IsBypassed (Uri host)

Parameters

host
The Uri instance of the host to check for proxy use.

Returns

true if the proxy server should not be used for host; otherwise, false.

Exceptions

TypeReason
ArgumentExceptionThe WebProxy.BypassList of the current instance contains an invalid regular expression.

Remarks

The WebProxy.IsBypassed(Uri) method is used to determine whether to bypass the proxy server when accessing an Internet resource.

The WebProxy.BypassProxyOnLocal and WebProxy.BypassList properties control the return value of the WebProxy.IsBypassed(Uri) method.

WebProxy.IsBypassed(Uri) returns true under any of the following conditions:

All other conditions return false.

Requirements

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