Export (0) Print
Expand All

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)

'Declaration
Public Property Proxy As IWebProxy
'Usage
Dim instance As WebClient
Dim value As IWebProxy

value = instance.Proxy

instance.Proxy = 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

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 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

ADD
Show:
© 2014 Microsoft