Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.1k views
in General by
Hi,

I'm developing a utility for a friend in Taiwan. He has Windows 2000, and his regional settings are set to Chinese Traditional, Chinese (Taiwan). When he calls the DirDetails(string dirName) function, he gets the following exception message:

"String was not recognized as a valid DateTime."

StackTrace:

at System.DateTimeParse.ParseFormatError(Boolean isThrowException, String resourceID)
at System.DateTimeParse.ParseDigits(__DTString str, Int32 digitLen, Boolean isThrowExp, Int32& result)
at System.DateTimeParse.ParseByFormat(__DTString str, __DTString format, ParsingInfo parseInfo, DateTimeFormatInfo dtfi, Boolean isThrowExp, DateTimeResult result)
at System.DateTimeParse.DoStrictParse(String s, String formatParam, DateTimeStyles styles, DateTimeFormatInfo dtfi, Boolean isThrowExp, DateTime& returnValue)
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.WindowsFileParser.Parse(String raw)
at EnterpriseDT.Net.Ftp.FTPFileFactory.Parse(String[] files)
at EnterpriseDT.Net.Ftp.FTPClient.DirDetails(String dirname)
at queueProcessor.FtpProcessor.batchDownloadXRayImages(Hashtable batchDownloadListHTable) in c:\\documents and settings\\administrator\\my documents\\visual studio projects\\queueprocessor\\ftpprocessor.cs:line 264



Anyway I can get around this?

Thanks!

1 Answer

0 votes
by (156k points)
Make sure he is using 1.1.5 - this uses the InvariantCulture which might help. Also, 1.1.5 allows you to set the ParsingCulture which he could try to set specifically to his regional culture.

Hi,

I'm developing a utility for a friend in Taiwan. He has Windows 2000, and his regional settings are set to Chinese Traditional, Chinese (Taiwan). When he calls the DirDetails(string dirName) function, he gets the following exception message:

"String was not recognized as a valid DateTime."

Categories

...