Home Forums .NET libraries Xceed SFTP/FTP for .NET QuickFtp broken?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21422 |

    I’m trying to use the QuickFtp class to upload a number of files to a particular folder.

    If I use the Send(string, int, string, string, string, string[]) overload, the files are uploaded, but they are not uploaded to the specified folder. Instead, the component creates a directory structure within the specified folder which mirrors the entire local path of the files.

    If I use the Send(string, int, string, string, AuthenticationMethod, VerificationFlags, Certificate, DataChannelProtection, bool, string, bool, bool, bool, ISynchronizeInvoke, CertificateReceivedCallback, CertificateRequiredCallback, ByteProgressionCallback, ItemProgressionCallback, object, string[]) overload (the simplest overload which provides the “preservePaths” parameter!), I get an exception:

    Xceed.Ftp.QuickFtpException: An error occurred while transfering file. 
    ---> Xceed.FileSystem.FileSystemInternalException: An unexpected internal failure occurred in the FileSystem component, or one of its descendants.
    Type: Xceed.FileSystem.MultipleItemListFolder
    FullName:  
    ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Xceed.Ftp.FtpFile..ctor(FtpConnection connection, String fullName)
       at Xceed.Ftp.FtpFolder.DoGetFile(FileSystemEventsSession session, String fileName)
       at Xceed.FileSystem.AbstractFolder.GetFileFromRelativeName(FileSystemEventsSession session, String relativeName)
       at Xceed.FileSystem.AbstractFolder.GetFile(FileSystemEvents events, Object userData, String relativeName)
       --- End of inner exception stack trace ---
       at Xceed.FileSystem.FileSystemEventsSession.OnPathException(Exception exception, String& path)
       at Xceed.FileSystem.AbstractFolder.GetFile(FileSystemEvents events, Object userData, String relativeName)
       at Xceed.FileSystem.AbstractFolder.GetFile(String relativeName)
       at Xceed.FileSystem.MultipleItemListFolder.BuildList(FileSystemEventsSession session, FileSystemItem destination, Boolean forward, Boolean recursive, Boolean includeFolders, Filter[] filters)
       at Xceed.FileSystem.AbstractFolder.CopyItemsTo(FileSystemEvents events, Object userData, AbstractFolder destinationFolder, Boolean recursive, Boolean includeFolders, Boolean replaceExistingFiles, Object[] filters)
       at Xceed.FileSystem.AbstractFolder.CopyFilesTo(FileSystemEvents events, Object userData, AbstractFolder destinationFolder, Boolean recursive, Boolean replaceExistingFiles, Object[] filters)
       at Xceed.Ftp.QuickFtp.DoSend(FtpConnection ftpConnection, String remoteDestinationFolder, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, CertificateReceivedCallback certificateReceivedCallback, CertificateRequiredCallback certificateRequiredCallback, ByteProgressionCallback byteProgressionCallback, ItemProgressionCallback itemProgressionCallback, Object userParams, String[] filesToSend)
       --- End of inner exception stack trace ---
       at Xceed.Ftp.QuickFtp.DoSend(FtpConnection ftpConnection, String remoteDestinationFolder, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, CertificateReceivedCallback certificateReceivedCallback, CertificateRequiredCallback certificateRequiredCallback, ByteProgressionCallback byteProgressionCallback, ItemProgressionCallback itemProgressionCallback, Object userParams, String[] filesToSend)
       at Xceed.Ftp.QuickFtp.Send(String hostname, Int32 port, String username, String password, AuthenticationMethod authenticationMethod, VerificationFlags verificationFlags, Certificate clientCertificate, DataChannelProtection dataChannelProtection, Boolean implicitAuthentication, String remoteDestinationFolder, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, ProxyClient proxy, Int32 timeout, Boolean passiveTransfer, RepresentationType defaultRepresentationType, TextWriter traceWriter, ISynchronizeInvoke synchronizingObject, CertificateReceivedCallback certificateReceivedCallback, CertificateRequiredCallback certificateRequiredCallback, ByteProgressionCallback byteProgressionCallback, ItemProgressionCallback itemProgressionCallback, Object userParams, TransferMode transferMode, String[] filesToSend)
       at Xceed.Ftp.QuickFtp.Send(String hostname, Int32 port, String username, String password, AuthenticationMethod authenticationMethod, VerificationFlags verificationFlags, Certificate clientCertificate, DataChannelProtection dataChannelProtection, Boolean implicitAuthentication, String remoteDestinationFolder, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, ProxyClient proxy, Int32 timeout, Boolean passiveTransfer, RepresentationType defaultRepresentationType, TextWriter traceWriter, ISynchronizeInvoke synchronizingObject, CertificateReceivedCallback certificateReceivedCallback, CertificateRequiredCallback certificateRequiredCallback, ByteProgressionCallback byteProgressionCallback, ItemProgressionCallback itemProgressionCallback, Object userParams, String[] filesToSend)
       at Xceed.Ftp.QuickFtp.Send(String hostname, Int32 port, String username, String password, AuthenticationMethod authenticationMethod, VerificationFlags verificationFlags, Certificate clientCertificate, DataChannelProtection dataChannelProtection, Boolean implicitAuthentication, String remoteDestinationFolder, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, ISynchronizeInvoke synchronizingObject, CertificateReceivedCallback certificateReceivedCallback, CertificateRequiredCallback certificateRequiredCallback, ByteProgressionCallback byteProgressionCallback, ItemProgressionCallback itemProgressionCallback, Object userParams, String[] filesToSend)
    

    Ignoring the fact that I have to call a horrendous overload just to satisfy the most basic requirement, this exception would appear to be a serious bug in the FTP component.

    Has anyone actually got the QuickFtp component to work properly?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Richard (had 1003 views)

    User (Old forums)
    Member
    Post count: 23064

    This turned out to be a problem with the path.

    • If I specify the path as “\path\to\my\folder\”, it works;
    • If I specify the path as “path/to/my/folder/”, it works;
    • If I specify the path as “/path/to/my/folder/”, I get an exception.

    The error occurs with the QuickFtp class, the DiskFolder.CopyFilesTo method and the DiskFile.CopyTo method.

    I submitted a bug report last Thursday, but I haven’t heard anything back. So much for the “next business day” response!

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Richard (had 1090 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.