Xceed .NET Libraries Documentation
Xceed.Ftp Assembly / Xceed.Ftp Namespace / AsyncFtpClient Class / BeginAuthenticate Method / BeginAuthenticate(AuthenticationMethod,VerificationFlags,Certificate,AsyncCallback,Object) Method
The authentication method used to connect to the FTP server.
The verification flags used to verify the FTP server's certificate.
The FTP client's certificate.
Callback method to be called when the asynchronous operation is completed.
An object containing state information for this operation.


In This Topic
    BeginAuthenticate(AuthenticationMethod,VerificationFlags,Certificate,AsyncCallback,Object) Method
    In This Topic
    Begins the authentification and encryption of the current FTP connection. Don't forget to call EndAuthenticate!
    Syntax
    'Declaration
     
    Public Overloads Function BeginAuthenticate( _
       ByVal authenticationMethod As AuthenticationMethod, _
       ByVal verificationFlags As VerificationFlags, _
       ByVal clientCertificate As Certificate, _
       ByVal callback As AsyncCallback, _
       ByVal state As Object _
    ) As IAsyncResult
    'Usage
     
    Dim instance As AsyncFtpClient
    Dim authenticationMethod As AuthenticationMethod
    Dim verificationFlags As VerificationFlags
    Dim clientCertificate As Certificate
    Dim callback As AsyncCallback
    Dim state As Object
    Dim value As IAsyncResult
     
    value = instance.BeginAuthenticate(authenticationMethod, verificationFlags, clientCertificate, callback, state)

    Parameters

    authenticationMethod
    The authentication method used to connect to the FTP server.
    verificationFlags
    The verification flags used to verify the FTP server's certificate.
    clientCertificate
    The FTP client's certificate.
    callback
    Callback method to be called when the asynchronous operation is completed.
    state
    An object containing state information for this operation.

    Return Value

    An System.IAsyncResult representing the status of the asynchronous operation.
    Remarks

    The BeginConnect method that requires an authentication method, verification flags and a client certificate can be used in the case where the FTP server does not allow authentication after the connection has been established.

    When using a callback, the System.IAsyncResult is provided as a parameter. You should call EndAuthenticate in that callback. When NOT providing a callback, you should keep the returned IAsyncResult and call EndAuthenticate with it when ready to complete. In this later case, the call to EndAuthenticate may block until the operation completes.

    When using this overload of the BeginAuthenticate method, the data channel is not secured (DataChannelProtection.Clear).

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also