GlobalProxySelection Class
NOTE: This class is now obsolete.
Contains a global default proxy instance for all HTTP requests. Namespace: System.NetAssembly: System (in system.dll)
'Declaration <ObsoleteAttribute("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. http://go.microsoft.com/fwlink/?linkid=14202")> _ Public Class GlobalProxySelection 'Usage Dim instance As GlobalProxySelection
/** @attribute ObsoleteAttribute("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use \'null\' instead of GetEmptyWebProxy. http://go.microsoft.com/fwlink/?linkid=14202") */
public class GlobalProxySelection
ObsoleteAttribute("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use \u0027null\u0027 instead of GetEmptyWebProxy. http://go.microsoft.com/fwlink/?linkid=14202") public class GlobalProxySelection
Not applicable.
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 WebRequest derived objects that support proxies and have their Proxy property value set to a null reference (Nothing in Visual Basic) (the default). Proxies are currently supported by FtpWebRequest, HttpWebRequest, and WebClient.
Note Changes to the GlobalProxySelection after a request is made are not reflected in a WebRequest.
The following code example sets the GlobalProxySelection for an HTTP proxy named "webproxy" on port 80.
Dim proxyURI As New Uri("http://webproxy:80") GlobalProxySelection.Select = New WebProxy(proxyURI)
Uri proxyURI = new Uri("http://webproxy:80");
GlobalProxySelection.set_Select(new WebProxy(proxyURI));
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Reference
GlobalProxySelection MembersSystem.Net Namespace