Share via


NegotiateStream.EndAuthenticateAsServer(IAsyncResult) Méthode

Définition

Termine une opération d'authentification du client asynchrone en attente qui a été démarrée avec un appel à BeginAuthenticateAsServer.

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 de IAsyncResult retournée par un appel à BeginAuthenticateAsServer.

Exceptions

asyncResult a la valeur null.

asyncResult n'a pas été créé par un appel à la méthode BeginAuthenticateAsServer.

L'authentification a échoué. Vous pouvez utiliser cet objet pour faire une nouvelle tentative d'authentification.

L'authentification a échoué. Vous pouvez utiliser cet objet pour faire une nouvelle tentative d'authentification.

Aucune authentification n'est en attente d'achèvement.

Remarques

Si l’opération n’est pas terminée, cette méthode se bloque jusqu’à ce qu’elle le fasse.

Lorsque l’authentification réussit, vous devez case activée les IsEncrypted propriétés et IsSigned pour déterminer quels services de sécurité sont utilisés par .NegotiateStream Vérifiez la IsMutuallyAuthenticated propriété pour déterminer si l’authentification mutuelle s’est produite.

Si l’authentification échoue, vous recevez un AuthenticationException ou un InvalidCredentialException. Dans ce cas, vous pouvez réessayer l’authentification avec des informations d’identification différentes.

Pour effectuer cette opération de manière synchrone, utilisez la AuthenticateAsServer méthode .

S’applique à