User (Old forums)MemberJanuary 6, 2009 at 5:50 amPost count: 23064
This error occurs when using the GetFolderContents method. This error only happpends for some of our regular FTP download sites. I’ve seen several other posts on different forums related to other components/products – same error. Happens after 01.01.2009.
Plz help! Our production systems are hit hard by this error as we have to download files from 30 sites manually on a daily basis.
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Per (had 6428 views)User (Old forums)MemberJanuary 6, 2009 at 5:53 amPost count: 23064
And this is the full stack trace:
StackTrace ” at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)\r\n at System.DateTime..ctor(Int32 year, Int32 month, Int32 day)\r\n at Xceed.Ftp.FtpUnixListingParser.ParseLine(String line)\r\n at Xceed.Ftp.FtpListingParserList.ParserSelector.ParseLine(String line)\r\n at Xceed.Ftp.FtpListingParserList.ParseListing(StringList lines)\r\n at Xceed.Ftp.Engine.ListFtpCommandSequence.OnCommandCompleted(BaseFtpCommand command, FtpReply reply)\r\n at Xceed.Ftp.Engine.FtpCommandSequence.CommandCompleted(IAsyncResult asyncResult)” string
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Per (had 504 views)User (Old forums)MemberJanuary 7, 2009 at 6:18 pmPost count: 23064
We just started getting this error on our production machine as well. We are using quite an old version of the Ftp object so I’m wondering if this has been fixed in later iterations. Our verison is 184.108.40.206. The behavior sounds about the same it occurs on GetFolderContents and just started happening after the first of the year. The server we are connecting to in this case is GlobalScape but it doesn’t seem to be completely related to the files in 2009. We have files in this folder from 2007 through 2009. If I remove all the files then there is no error, if I remove all but the 2009’s then I get no error. I’d added in random files to see if I could get the error but haven’t found the right file yet. If I put them all in there then the issues shows itself.
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Nathan (had 783 views)User (Old forums)MemberJanuary 13, 2009 at 10:22 amPost count: 23064
Indeed we have the same error as well since 1/1/2009. (version 1.1.5181.0)
No sultion yet ?
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Xavier (had 601 views)Xceed SupportMemberJanuary 13, 2009 at 11:08 amPost count: 5658
Would it be possible to get the type of server on which you get this error?
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Chris [Xceed] (had 551 views)User (Old forums)MemberJanuary 19, 2009 at 4:07 pmPost count: 23064
I have connected manually and have been able to find the FTP server type from 3 of our 4 failing FTP download sites:
1. SlimFTPd 3.18, by WhitSoft Development (www.whitsoftdev.com)
2. ProFTPD 1.3.0 Server (Unix)
3. ProFTPD 1.2.7 Server (Unix
3. Unsure, but its a Unix box:
[22:03:15] 215 UNIX Type: L8
[22:03:15] Detected Server Type: UNIX
We also used an old version of Xceed FTP, but I tried out the trial version on the newest version. Same problem for both versions.
If you guys (Xceed) solve this issue quick, I will upgrade my whole Xceed suite ASAP!
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Per (had 635 views)Xceed SupportMemberJanuary 19, 2009 at 4:29 pmPost count: 5658
would it be possible to get a test access to one of the problematic server to help us identify where the problem could be? If so, just send an email at firstname.lastname@example.org at Chris’ attention refering this forum post.
Thanks, your help is really appreciated !
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Chris [Xceed] (had 510 views)User (Old forums)MemberJanuary 20, 2009 at 2:03 pmPost count: 23064
We have finally identified the issue. What happens is that some servers don’t not return the full date for files created less than one year ago. That is, they will only return the day/month part of the date, not the year. So when parsing the file listing, the library assumes that when the year is not provided, it is the current year. In this case, the library always set the year to 2009 (which may not be right, since it could be 2008). Now, 2008 was a leap year (February 29), which is not the case for 2009. Thus, when the library sets the date to February 29, 2009, System.DateTime does not recognize it as a valid date, thus the exception.
We have corrected the library so that the year the library now sets is valid (e.g. February 29, 2008) for all files, and it now works fine. The fix will be available sometime in February 2009, and it will be in version 4.0. Note that .NET 2.0 is required to run this version.
Meanwhile, the workaround is to provide your own parser in the case of problematic dates. Here is a way to do it, but you will need to add your own parsing algorithm.
First, provide the custom parser :
public class CustomUnixListingParser : FtpUnixListingParser
public override FtpItemInfo ParseLine( string line )
FtpItemInfo itemInfo = null;
itemInfo = base.ParseLine( line );
catch( Exception )
// Create an empty FtpItemInfo to populate with the relevant information
//Parse the line manually for problematic files here
Then use it this way in the client code :
FtpClient ftpClient = new FtpClient();
// Lookup for the FtpUnixListingParser
int unixParserIndex = 0;
foreach( FtpListingParser parser in ftpClient.ListingParsers )
if( parser is FtpUnixListingParser )
// Replace the default FtpUnixListingParser by the custom one
ftpClient.ListingParsers[ unixParserIndex ] =
//Get the listing, which will call the custom code for a Unix format
itemList = ftpClient.GetFolderContents();
Now, if your server uses another format, you may have to derive from a different parser, or if you connect to different servers which are using different listing format, you will have to implement more than one parser. You will find the default ones we support here :
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 5624 views)
- You must be logged in to reply to this topic.