Home Forums .NET libraries Xceed SFTP/FTP for .NET GetFolderContents is returning Count zero

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

    Hello, this is my first post to this forum and my first experience with xceed ftp. 

    The program I am having a problem with (a vb.net web application) was written before I started working here and is run every day to download files from a remote server.  It stopped working the first of this year.  I have been debugging it (it’s all new code to me) but what I found is the FtpClient’s GetFolderContents method is returning a Count of zero even though there are most definitely files available.  My coworker uses CuteFTP and we can see all the files that I am inquiring about. Has anyone run into a problem like this, or know what the cause might be?

     Thanks!

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

    Xceed Support
    Member
    Post count: 5658

    Hi,

      other people have mentioned this problem. Would it be possible to get the type of the ftp server and a log of a connection when the Xceed.Ftp library is used (using TraceWriter property on FtpConnection http://doc.xceedsoft.com/products/XceedFileSystem/Xceed.Ftp~Xceed.Ftp.FtpConnection~TraceWriter.html ) and one when CuteFtp is used?

     This would help us identify what can be the source of the problem. 

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Chris [Xceed] (had 200 views)

    User (Old forums)
    Member
    Post count: 23064

    Okay, I will try what you suggest but it sounds like a lot of work to debug something that always operated successfully before.  While I can get the log for Xceed doing as you ask, CuteFtp is a GUI.  I don’t have an interface to it from any program.  My coworker who is a business person logs on there, and he can manually get the files for us which is how we’ve been able to continue our daily processes without using the .net application to do it (which is all automated).  I’d also like to ask: could this have anything to do with the year change?  Is it just a coincidence it worked until 1/1/2009???

    Thanks for your help!

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

    User (Old forums)
    Member
    Post count: 23064

    I have no such thing as this Xceed.Ftp.FtpConnection
    I am getting a compiler error on these two lines: 

    ‘ 01/13/09 – mad – Added

    Dim ftp As New FtpConnection()

    http://ftp.TraceWriter =

    New StreamWriter(“d:\ftp.log”)

     It says type FtpConnection is not defined.  I have Imports Xceed.Ftp at the top of my file but that is not where the FtpConnection object is.  Can you help me so I can proceed?

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

    Xceed Support
    Member
    Post count: 5658

    Hi, 

      my mistake, you are using FtpClient, you should set the TraceWriter property on FtpClient (http://doc.xceedsoft.com/products/XceedFileSystem/Xceed.Ftp~Xceed.Ftp.FtpClient~TraceWriter.html)

     Thanks for your help 

       

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Chris [Xceed] (had 343 views)

    Xceed Support
    Member
    Post count: 5658

    Here is a complete snippet that would give you the output i would like to see:

     Xceed.Ftp.Licenser.LicenseKey = “License Key”

    Dim client As FtpClient = New FtpClient()

    client.TraceWriter = New StreamWriter(“c:\log.txt”)

    client.Connect(“server”)

    client.Login(“user”, “pass”)

     

    ‘ This is where the error is raised according to the information you provided

    ‘client.GetFolderContents() 

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Chris [Xceed] (had 525 views)

    User (Old forums)
    Member
    Post count: 23064

    Great, I have a log.  What exactly from it would you like to see?  Obviously, I am hesitant to paste or attach the whole file as our password to a proprietary server is within. I’m not even sure I should post the Ip address (I’m a nervous person…)  Is there something specific I can zero in on? 

    BTW, you mentioned getting an error from GetFolderContents.  It’s not an error.  It’s reporting a count of 0 when it should be more like hundreds.  Thanks.

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

    Xceed Support
    Member
    Post count: 5658

    Only the welcome message would be enough to know which type of server you are connecting to.

    e.g.: 

    Status: Connection established, waiting for welcome message…

    Response: 220 Serv-U FTP Server v6.0 for WinSock ready… 

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Chris [Xceed] (had 152 views)

    User (Old forums)
    Member
    Post count: 23064

    I didn’t find exactly what you said to look for, but I think this is what you wanted to see:

    220 mcointerweb FTP server ready.

     Also this may be relevant:

    > LIST _taxes*.dly
    Data connection established with ***.**.*.***:***** on 1/13/2009 @ 11:38:32 AM
    < 150 Opening ASCII mode data connection for file list
    < 226 Transfer complete.

    I don’t know if I am supposed to see a list of files in between “Opening” and “Transfer complete”.

    Thanks.

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

    User (Old forums)
    Member
    Post count: 23064

    The file listing does not appear in the log, it is only the commands sent and responses received on the command channel that are logged.  The listing of files as such happens on the data channel, that is, on the channel were files are actually transfered.

    Could you tell us what version of our component you are using?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 318 views)

    Xceed Support
    Member
    Post count: 5658

    Thanks for the log, but unfortunately, there is no relevant information that could help us identify what can be the cause of the issue. would it be possible to provide some other information please:

    What it the .NET framework version are you using? 

    What version of the product are you using? (version of the dlls)  

    Some of the lines returned by the following code snippet to see what the server actualy returns before it is parsed by the ListignParsers:

    folderContents = client.GetRawFolderContents(True)

    For Each line In folderContents

      Console.WriteLine(line)

    Next line

     

    They should look like :

     -rw-rw-rw-rw- 1 user group 87680 Jan 25 2008 ..

     -rw-rw-rw-rw- 1 user group 87680 Jan 25 2008 FileSystem.tar.gz

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Chris [Xceed] (had 350 views)

    User (Old forums)
    Member
    Post count: 23064

    .NET version is 2.0.

     To find the version of your product, I would…? (I apologize, but since I have just started looking at this code as of last Friday, I’m not sure how to find this out.  Thanks).

     I will work on the last thing you asked for next.

    Thank you for your on-going communication and support regarding this issue!  And thanks to Andre for the info about the log – I wasn’t sure if I should see a filelist or not (but that would make the log awfully long if it listed them all!)

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

    User (Old forums)
    Member
    Post count: 23064

    Visual Studio is telling me this about your dll’s:

    Xceed.FileSystem.dll version 2.0.116.0

    Xceed.Ftp.dll version 2.0.100.0

    (if that is the correct place to look for version info).  Thanks.

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

    User (Old forums)
    Member
    Post count: 23064

    You are using a quite old version.  Since you are in .NET 2.0, can you try our latest version (3.7) to see if it resolves the issue?  Reports from an other customer lets us think it does.

    You can download it here :

    http://xceed.com/Xredirect.aspx?url=http://download4.xceedsoft.com/Packages/3.2.8577.11540/XceedComponents.exe

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 295 views)

    User (Old forums)
    Member
    Post count: 23064

    This is the code I added: 

    ‘ 1/13/09 – mad – Debugging. This is new.

    Dim foldercontents As StringList = objFtpClient.GetRawFolderContents(True)

    Dim line As String

    For Each line In foldercontents

    Console.WriteLine(line)

    Next line

    ‘ 1/13/09 End

     And since it’s an asp.net page (I don’t have a console), in the VS debugger I examined “line” as it was going through the loop: 

    ? line

    “realgy_signup011608.dly”

    ? line

    “realgy_taxes011608.dly”

    ? line

    “realgy_usage011608.dly”

    ? line

    “realgy_billing011608.dly”

    This is 100% correct.  These are the files I am expecting to find, but I want realgy_taxes011209.dly, which would be yesterday (I’m sure it would get there if it kept looping).  There should be a taxes, billing, usage and signup file every day (or every business day).  So why is this finding them, yet GetFolderContents says there are none?

    Thanks!

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

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