Contains a global default proxy instance for all HTTP requests.
For a list of all members of this type, see GlobalProxySelection Members.
[Visual Basic] Public Class GlobalProxySelection [C#] public class GlobalProxySelection [C++] public __gc class GlobalProxySelection [JScript] public class GlobalProxySelection
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
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 setting is initialized from the global or application configuration file, and can be overridden for individual requests, or disabled by setting the HttpWebRequest.Proxy property to the result of the GetEmptyWebProxy method.
The proxy settings stored in GlobalProxySelection are used by any HttpWebRequest instances whose Proxy property is not set to another value.
Note Changes to the GlobalProxySelection after a request is made are not reflected in a WebRequest.
[Visual Basic, C#, C++] The following example sets the GlobalProxySelection for an HTTP proxy named "webproxy" on port 80.
[Visual Basic] Dim proxyURI As New Uri("http://webproxy:80") GlobalProxySelection.Select = New WebProxy(proxyURI) [C#] Uri proxyURI = new Uri("http://webproxy:80"); GlobalProxySelection.Select = new WebProxy(proxyURI); [C++] Uri* proxyURI = new Uri(S"http://webproxy:80"); GlobalProxySelection::Select = new WebProxy(proxyURI);
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button in the upper-left corner of the page.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: System (in System.dll)