WebClient.Proxy Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the proxy used by this WebClient object.

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

property IWebProxy^ Proxy {
	IWebProxy^ get ();
	void set (IWebProxy^ value);
/** @property */
public IWebProxy get_Proxy ()

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

public function get Proxy () : IWebProxy

public function set Proxy (value : IWebProxy)

Property Value

An IWebProxy instance used to send requests.

Exception typeCondition


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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions