Export (0) Print
Expand All

WebClient.Proxy Property

Gets or sets the proxy used by this WebClient object.

Namespace: System.Net
Assembly: System (in system.dll)

public IWebProxy Proxy { get; set; }
/** @property */
public IWebProxy get_Proxy ()

/** @property */
public void set_Proxy (IWebProxy value)

public function get Proxy () : IWebProxy

public function set Proxy (value : IWebProxy)

Not applicable.

Property Value

An IWebProxy instance used to send requests.

Exception typeCondition

ArgumentNullException

Proxy is set to a null reference (Nothing in Visual Basic).

The Proxy property identifies the IWebProxy instance that communicates with remote servers on behalf of this WebClient object. The proxy is set by the system using configuration files and the Internet Explorer Local Area Network settings. To specify that no proxy should be used, set the Proxy property to the proxy instance returned by the GetEmptyWebProxy method.

For information on automatic proxy detection, see Automatic Proxy Detection.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft