SslStream.EndAuthenticateAsServer(IAsyncResult) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Termine une opération d’authentification client asynchrone en attente démarrée avec un appel précédent à BeginAuthenticateAsClient.
public:
virtual void EndAuthenticateAsServer(IAsyncResult ^ asyncResult);
public virtual void EndAuthenticateAsServer(IAsyncResult asyncResult);
abstract member EndAuthenticateAsServer : IAsyncResult -> unit
override this.EndAuthenticateAsServer : IAsyncResult -> unit
Public Overridable Sub EndAuthenticateAsServer (asyncResult As IAsyncResult)
Paramètres
- asyncResult
- IAsyncResult
Instance IAsyncResult retournée par un appel à BeginAuthenticateAsClient.
Exceptions
asyncResult a la valeur null.
asyncResult n’a pas été créé par un appel à BeginAuthenticateAsClient.
L’authentification a échoué et laissé cet objet dans un état inutilisable.
Aucune authentification cliente en attente n’est terminée.
Remarques
Si l’opération n’est pas terminée, cette méthode se bloque jusqu’à ce qu’elle le fasse. Une fois l’authentification réussie, vous devez vérifier les propriétés et IsSigned les IsEncrypted propriétés pour déterminer quels services de sécurité sont utilisés par le SslStream. Vérifiez la propriété pour déterminer si l’authentification IsMutuallyAuthenticated mutuelle s’est produite.
Si l’authentification échoue, vous recevez un AuthenticationException, et cela SslStream n’est plus utilisable. Vous devez fermer cet objet et supprimer toutes les références à cet objet afin qu’il puisse être collecté par le garbage collector.
Pour effectuer cette opération de façon synchrone, utilisez l’une AuthenticateAsClient des méthodes.