Mono Class Library: System.Net.HttpWebRequest Overview | Members

System.Net.HttpWebRequest.Proxy Property

Gets or sets network proxy information for the current instance.

public override IWebProxy Proxy { set; get; }

Value

The System.Net.WebProxy instance to use as a proxy for the current instance. The default value is set by calling GlobalProxySelection.Select .

Permissions

TypeReason
!:System.Security.Permissions.WebPermissionRequires unrestricted System.Net.WebPermission. See System.Security.Permissions.PermissionState.Unrestricted.

Exceptions

TypeReason
ArgumentNullExceptionA set operation was requested and the specified value was null.
InvalidOperationExceptionA set operation was requested but data has already been sent to the request stream.
System.Security.SecurityExceptionThe caller does not have permission for the requested operation.

Remarks

The HttpWebRequest.Proxy property identifies the System.Net.WebProxy instance to use to communicate with the destination server.

Note:

To specify that no proxy should be used, set the HttpWebRequest.Proxy property to the proxy instance returned by the GlobalProxySelection.GetEmptyWebProxy method.

This property overrides WebRequest.Proxy.

Requirements

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