NetworkInformation.GetProxyConfigurationAsync(Uri) Method

Definition

Gets proxy configuration for a connection using the specified URI.

Note

This class method is not supported on Windows Phone.

public:
 static IAsyncOperation<ProxyConfiguration ^> ^ GetProxyConfigurationAsync(Uri ^ uri);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProxyConfiguration> GetProxyConfigurationAsync(Uri const& uri);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProxyConfiguration> GetProxyConfigurationAsync(System.Uri uri);
function getProxyConfigurationAsync(uri)
Public Shared Function GetProxyConfigurationAsync (uri As Uri) As IAsyncOperation(Of ProxyConfiguration)

Parameters

uri
Uri Uri

The proxy configuration URI.

Returns

Information about the connection proxy.

Attributes

Remarks

The uri parameter passed to the GetProxyConfigurationAsync method should contain a hostname or IP address for the target endpoint and service name, port number, or protocol scheme.

If the GetProxyConfigurationAsync method is successful, a ProxyConfiguration object for the specified uri parameter is returned by the IAsyncOperation(ProxyConfiguration) handler.

In a UWP app, the StreamSocket class supports connecting to a remote endpoint when proxies are required to complete the connection. This support for proxies is automatic and transparent to the app. For more detailed information, see the remarks on Support for proxies in the StreamSocket class reference.

Applies to

See also