NetworkInformation.GetProxyConfigurationAsync(Uri) Methode

Definition

Ruft die Proxykonfiguration für eine Verbindung unter Verwendung des angegebenen URI ab.

Hinweis

Diese Klassenmethode wird auf Windows Phone nicht unterstützt.

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)

Parameter

uri
Uri Uri

Der Proxykonfigurations-URI.

Gibt zurück

Informationen zum Verbindungsproxy.

Attribute

Hinweise

Der an die GetProxyConfigurationAsync-Methode übergebene URI-Parameter sollte einen Hostnamen oder eine IP-Adresse für den Zielendpunkt und den Dienstnamen, die Portnummer oder das Protokollschema enthalten.

Wenn die GetProxyConfigurationAsync-Methode erfolgreich ist, wird vom IAsyncOperation(ProxyConfiguration)-Handler ein ProxyConfiguration-Objekt für den angegebenen URI-Parameter zurückgegeben.

In einer UWP-App unterstützt die StreamSocket-Klasse das Herstellen einer Verbindung mit einem Remoteendpunkt, wenn Proxys erforderlich sind, um die Verbindung abzuschließen. Diese Unterstützung für Proxys ist automatisch und für die App transparent. Ausführlichere Informationen finden Sie in den Hinweisen zur Unterstützung von Proxys in der StreamSocket-Klassenreferenz .

Gilt für:

Weitere Informationen