Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

hughng

Posts

7

Joined

Tue Dec 07, 2010 6:35 am

method Exists in FTPConnection intermittently error

by hughng » Tue Oct 25, 2011 7:56 am

I am using version 2.2.2 and the FTPConnection class. Function Exist(remote file) intermittently error out either with CODE=425

- EnterpriseDT.Net.Ftp.FTPException {"Can't open data connection. (code=425)"} EnterpriseDT.Net.Ftp.FTPException
_HResult -2146232832 Integer
_message "Can't open data connection." String
+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary
HelpLink Nothing String
HResult -2146232832 Integer
InnerException Nothing System.Exception
IsTransient False Boolean
Message "Can't open data connection. (code=425)" String
ReplyCode 425 Integer
Source "edtFTPnet" String
StackTrace " at EnterpriseDT.Net.Ftp.FTPControlSocket.ValidateReply(FTPReply reply, String[] expectedReplyCodes) at EnterpriseDT.Net.Ftp.FTPControlSocket.SetDataPort(IPEndPoint ep) at EnterpriseDT.Net.Ftp.FTPClient.Exists(String remoteFile) at EnterpriseDT.Net.Ftp.FTPConnection.Exists(String remoteFile) at ICTCheckin.myFTPConnect.moveFile(String tsource, String tdes) in F:\DOTNET\ICTCheckin\ICTCheckin\myFTPConnect.vb:line 190" String
+ TargetSite {EnterpriseDT.Net.Ftp.FTPReply ValidateReply(EnterpriseDT.Net.Ftp.FTPReply, System.String[])} System.Reflection.MethodBase



If I repeatedly call this function the result is intermittently. 50% will return the correct result and 50% with have exception as shown. Is there any reliable way to query for existed remote file from the FTP server?
Thank you,

Hugh
no avatar
User

EDT Support

Posts

905

Joined

Mon Apr 26, 2004 3:03 pm

by EDT Support » Tue Oct 25, 2011 10:22 am

Can you please enabled logging at the DEBUG level and post the relevant portion of the log.

- Hans (EnterpriseDT)
no avatar
User

hughng

Posts

7

Joined

Tue Dec 07, 2010 6:35 am

by hughng » Thu Oct 27, 2011 12:13 am

Switch to the latest Pro version and the error gone away. I still try to run some more test with logging turn on. As soon as I see the same error, I will post the log.
no avatar
User

hughng

Posts

7

Joined

Tue Dec 07, 2010 6:35 am

by hughng » Thu Oct 27, 2011 8:04 am

Got the error again with the Pro version. Turned on log file and emailed the log to support. Please check.
Thank you,

Hugh
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Sat Oct 29, 2011 7:18 am

It wasn't detecting that the file wasn't found from the msg returned from SIZE. Solution is to do this:

myftp.FileNotFoundMessages.Add("CANNOT FIND")

Who is online

Users browsing this forum: No registered users and 37 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron