System.Net.WebRequest.Proxy Property

When overridden in a descendant class, gets or sets the network proxy to use to access this Internet resource.

Syntax

public virtual IWebProxy Proxy { get; set; }

Value

A System.Net.IWebProxy to use to access resources.

Exceptions

TypeReason
NotSupportedExceptionThis property is not implemented in the derived class.

Remarks

The WebRequest.Proxy property identifies the network proxy that the request uses to access the Internet resource. The request is made through the proxy server rather than directly to the Internet resource.

Note:

The System.Net.WebRequest class is an abstract class. The actual behavior of System.Net.WebRequest instances at run time is determined by the descendant class returned by the WebRequest.Create(Uri) method. For more information about default values and exceptions, see the documentation for the descendant classes, such as System.Net.HttpWebRequest and System.Net.FileWebRequest.

Requirements

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