GlobalProxySelection Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. https://go.microsoft.com/fwlink/?linkid=14202
Caution
GlobalProxySelection has been deprecated. Use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy.
Caution
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
Contains a global default proxy instance for all HTTP requests.
public ref class GlobalProxySelection
[System.Obsolete("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. https://go.microsoft.com/fwlink/?linkid=14202")]
public class GlobalProxySelection
[System.Obsolete("GlobalProxySelection has been deprecated. Use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy.")]
public class GlobalProxySelection
[System.Obsolete("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
public class GlobalProxySelection
[<System.Obsolete("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. https://go.microsoft.com/fwlink/?linkid=14202")>]
type GlobalProxySelection = class
[<System.Obsolete("GlobalProxySelection has been deprecated. Use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy.")>]
type GlobalProxySelection = class
[<System.Obsolete("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")>]
type GlobalProxySelection = class
type GlobalProxySelection = class
Public Class GlobalProxySelection
- Inheritance
-
GlobalProxySelection
- Attributes
The following code example sets the GlobalProxySelection for an HTTP proxy named "webproxy" on port 80.
Uri^ proxyURI = gcnew Uri( "http://webproxy:80" );
GlobalProxySelection::Select = gcnew WebProxy( proxyURI );
Uri proxyURI = new Uri("http://webproxy:80");
GlobalProxySelection.Select = new WebProxy(proxyURI);
Dim proxyURI As New Uri("http://webproxy:80")
GlobalProxySelection.Select = New WebProxy(proxyURI)
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 null
(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.
Global |
Initializes a new instance of the GlobalProxySelection class. |
Select |
Gets or sets the global HTTP proxy. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Returns an empty proxy instance. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Product | Versions (Obsolete) |
---|---|
.NET | (Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9) |
.NET Framework | 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1) |
.NET Standard | (2.0, 2.1) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: