System.Net.GlobalProxySelection Class

public class GlobalProxySelection

Base Types

Object
  GlobalProxySelection

Assembly

System

Library

Networking

Summary

Contains a global default proxy instance for all HTTP requests.

Description

The GlobalProxySelection stores the proxy settings for the default proxy that WebRequest instances use to contact Internet sites beyond the local network. The default proxy settings are initialized from a global or application configuration file, and can be overridden for individual requests, or disabled by setting the System.Net.HttpWebRequest.Proxy property to the object returned by the System.Net.GlobalProxySelection.GetEmptyWebProxy method.

The proxy settings stored in GlobalProxySelection are used by a HttpWebRequest instance if its System.Net.HttpWebRequest.Proxy property is not set.

See Also

System.Net Namespace

Members

GlobalProxySelection Constructors

GlobalProxySelection Constructor

GlobalProxySelection Methods

GlobalProxySelection.GetEmptyWebProxy Method

GlobalProxySelection Properties

GlobalProxySelection.Select Property


GlobalProxySelection Constructor

public GlobalProxySelection();

Summary

Constructs a new instance of the GlobalProxySelection class.

See Also

System.Net.GlobalProxySelection Class, System.Net Namespace

GlobalProxySelection.GetEmptyWebProxy Method

public static IWebProxy GetEmptyWebProxy();

Summary

Returns an empty proxy object.

Return Value

A IWebProxy that contains no information.

Description

The System.Net.GlobalProxySelection.GetEmptyWebProxy method returns an empty IWebProxy instance indicating that no proxy is used to access an Internet resource.

See Also

System.Net.GlobalProxySelection Class, System.Net Namespace

GlobalProxySelection.Select Property

public static IWebProxy Select { get; set; }

Summary

Gets or sets the global proxy information.

Property Value

A IWebProxy that identifies the proxy server used by the System.Net.HttpWebRequest.GetResponse method if no proxy information is specified.

Exceptions

Exception TypeCondition
SecurityExceptionThe caller does not have permission for the requested operation.

See Also

System.Net.GlobalProxySelection Class, System.Net Namespace