Welcome to the Xceed Community | Help
Community Search  

GetFolderContents error

Sort Posts: Previous Next
  •  04-09-2008, 9:43 AM Post no. 6081

    GetFolderContents error

    I am using the Xceed Library 1.1. component in C# .Net 2003. The GetFolderContents works perfect when the files on the FTP folder is less then 200. When the files accumlated up to 300 or above, it will generate an error of "The remote file could not be opened by the FTP server."

    Here is my two lines of codes

    XceedFtpLib.XceedFtp ftpServer = new XceedFtpLib.XceedFtpClass();
    object folderItems = ftpServer.GetFolderContents( "*.*.done", XceedFtpLib.EXFContentsFormat.fcfCollection );


    Is it a bug of the component or what is wrong here?

    many thanks

    Casper
  •  04-10-2008, 4:40 PM Post no. 6082 in reply to 6081

    Re: GetFolderContents error

    I tried it and wasn't able to reproduce it. I tested it with more than 500+ files.

    Here is the code I used to test:

    <code>
    XceedFtp ftpClient = new XceedFtpClass();
    ftpClient.License( "license key" );

    ftpClient.ServerAddress = @"Server";
    ftpClient.UserName = "user";
    ftpClient.Password = "pass";

    ftpClient.Connect();

    ftpClient.ChangeCurrentFolder( @"TestFolder" );

    XceedFtpFolderItems items = ( XceedFtpFolderItems )ftpClient.GetFolderContents( "", EXFContentsFormat.fcfCollection );

    int value = 0;
    foreach( XceedFtpFolderItem item in items )
    {
    Console.WriteLine( value.ToString() + "/" + items.Count.ToString() + ": " + item.ItemName );
    value++;
    }

    ftpClient.Disconnect();
    </code>
    Charles Bérubé-Rémillard
    Technical Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.