News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Security Library Forum
 
file list for FTP over SSL  
by josh [josh dot coffman at americawest dot com]
posted on 2005/08/04

Based on the FTPClient example. I was able to implement my own client, but haven't been able to get much further than login. I am trying to get a file listing from the FTP/SSL server, but haven't been able to work out a way to get the data back via a dataconnection. I am using PASV to get the endpoint; then I create a new connection on those and send "LIST" on the main connection. Reading Receive() gets nothing, and socket.Available is always = 0. An example would be great. A push in the right direction would be much appreciated also.

Thanks,
j

by Fred
posted on 2005/08/31

I normally do a receive first on the data socket and then compare the amount received against the buffer size. If those two don't match then I check the available amount. If its 0 then I exit out, otherwise continue looping the receive... sometimes theres lag and it cant fill a buffer.

Also, check your response code after you call for the data... sometimes the server isn't sending it and telling you why with an error code.

 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.