Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.9k views
in .NET FTP by (120 points)
Hi,

I'm using edtftpnet v 1.2.3 and I am having a problem with the GlobalScape Secure FTP Server (v. 3.1).

Modtime throws an exception
String was not recognized as a valid DateTime.
at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
at System.DateTime.ParseExact(String s, String format, IFormatProvider provider)
at EnterpriseDT.Net.Ftp.FTPClient.ModTime(String remoteFile)

I used ethereal to capture the raw ftp
230 Login OK. Proceed.
MDTM testfile.zip
213 20061113133252.109

It seems modtime doesn't like the .109 (milliseconds?).

Anyone know if I have to set a flag or something to handle this? (trying not to recompile and have my own version of edtftp)

1 Answer

0 votes
by (162k points)
That's right. I've never seen milliseconds returned from modtime before.

Try changing this line:

private static readonly string tsFormat = "yyyyMMddHHmmss";

to:

private static readonly string tsFormat = "yyyyMMddHHmmss'.'fff";

and recompiling.

If this works, post here and we'll incorporate it into the codebase so your modtime will work for the next release.

230 Login OK. Proceed.
MDTM testfile.zip
213 20061113133252.109

It seems modtime doesn't like the .109 (milliseconds?).

Categories

...