'DeclarationPublic Event MultipleFileTransferError As MultipleFileTransferErrorEventHandler
'UsageDim instance As FtpClient Dim handler As MultipleFileTransferErrorEventHandler AddHandler instance.MultipleFileTransferError, handler
public event MultipleFileTransferErrorEventHandler MultipleFileTransferError
The event handler receives an argument of type MultipleFileTransferErrorEventArgs containing data related to this event. The following MultipleFileTransferErrorEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Action | Gets or sets a value indicating the action to take for the file failed to be transferred during a multiple-file transfer. |
| Exception | Gets the exception that was thrown while attempting to transfer a file during a multiple-file transfer. |
| LocalItemName | Gets the local path and name of the item that failed to be transferred during a multiple-file transfer. |
| RemoteItemName | Gets the remote name of the item that failed to be transferred during a multiple-file transfer. |
| RemoteItemType | Gets or sets the type of the remote item which failed to be transferred during a multiple-file transfer. |
This event can only be raised by the SendMultipleFiles or ReceiveMultipleFiles methods.
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" ' Set license key here to deploy Dim ftp As New FtpClient() AddHandler ftp.MultipleFileTransferError, AddressOf Me.transfer_error ftp.Connect( "localhost" ) ftp.Login() ftp.ChangeCurrentFolder( "ClientFiles" ) ftp.ReceiveMultipleFiles( String.Empty, "C:\ClientFiles", False, False ) ftp.Disconnect() Private Sub transfer_error( ByVal sender As Object, ByVal e As MultipleFileTransferErrorEventArgs ) If TypeOf e.Exception Is FtpReplyException Then ListBox1.Items.Add("Unable to transfer " + e.RemoteItemName + _ ". The message returned by the FTP server was : " + e.Exception.Message) e.Action = MultipleFileTransferErrorAction.Ignore End If End Sub
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" // Set license key here to deploy FtpClient ftp = new FtpClient(); ftp.MultipleFileTransferError += new MultipleFileTransferErrorEventHandler( this.transfer_error ); ftp.Connect( "localhost" ); ftp.Login(); ftp.ChangeCurrentFolder( "ClientFiles" ); ftp.ReceiveMultipleFiles( string.Empty, @"C:\ClientFiles", false, false ); ftp.Disconnect(); private void transfer_error( object sender, MultipleFileTransferErrorEventArgs e ) { FtpReplyException exception = e.Exception as FtpReplyException; if( exception != null ) { listBox1.Items.Add( "Unable to transfer " + e.RemoteItemName + ". The message returned by the FTP server was : " + e.Exception.Message ); e.Action = MultipleFileTransferErrorAction.Ignore; } }
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" // Set license key here to deploy FtpClient ftp = new FtpClient(); ftp.MultipleFileTransferError += new MultipleFileTransferErrorEventHandler( this.transfer_error ); ftp.Connect( "localhost" ); ftp.Login(); ftp.ChangeCurrentFolder( "ClientFiles" ); ftp.ReceiveMultipleFiles( string.Empty, @"C:\ClientFiles", false, false ); ftp.Disconnect(); private void transfer_error( object sender, MultipleFileTransferErrorEventArgs e ) { FtpReplyException exception = e.Exception as FtpReplyException; if( exception != null ) { listBox1.Items.Add( "Unable to transfer " + e.RemoteItemName + ". The message returned by the FTP server was : " + e.Exception.Message ); e.Action = MultipleFileTransferErrorAction.Ignore; } }
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Standard: netstandard2.0, netstandard2.1
.NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.