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

We have a system that is raising an exception when the PASV command is issued. It also says 'Please contact us. (code=500)'  in the EnterpriseDT generated exception.

DEBUG [FTPConnection] 10 Jan 2017 14:51:13.649 : Listed directory ''
DEBUG [FTPConnection] 10 Jan 2017 14:51:13.649 : Exists(MYFILE.TXT)
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:13.649 : ---> SIZE MYFILE.TXT
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:13.680 : 550 /Receive/MYFILE.TXT: No such file.
DEBUG [FTPConnection] 10 Jan 2017 14:51:13.680 : UploadFile(D:\SITES\MySite\docs\MYFILE.TXT,MYFILE.TXT,False)
DEBUG [FTPConnection] 10 Jan 2017 14:51:13.680 : Cancel resume
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:13.680 : ---> REST 0
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:13.711 : 350 Restarting at 0. Send STORE or RETRIEVE.
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:13.711 : ---> PASV
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:34.756 : 500 INTERNAL ERROR: 'RETR' is missing the response string for 1.  Please contact us.
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:34.756 : Expected reply codes = [227] (strict=False)
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 : Caught exception INTERNAL ERROR: 'RETR' is missing the response string for 1.  Please contact us. (code=500)
DEBUG [FTPClient] 10 Jan 2017 14:51:34.756 : Closing source stream
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 : Caught exception
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 : EnterpriseDT.Net.Ftp.FTPException: INTERNAL ERROR: 'RETR' is missing the response string for 1.  Please contact us. (code=500)
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 :    at EnterpriseDT.Net.Ftp.FTPControlSocket.ValidateReply(FTPReply reply, String[] expectedReplyCodes)
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 :    at EnterpriseDT.Net.Ftp.FTPControlSocket.CreateDataSocketPASVInternal()
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 :    at EnterpriseDT.Net.Ftp.FTPControlSocket.CreateDataSocketPASV()
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 :    at EnterpriseDT.Net.Ftp.FTPControlSocket.CreateDataSocket(FTPConnectMode connectMode)
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 :    at EnterpriseDT.Net.Ftp.FTPClient.InitPut(String remoteFile, Boolean append)
ERROR [FTPClient] 10 Jan 2017 14:51:34.756 :    at EnterpriseDT.Net.Ftp.FTPClient.PutASCII(Stream srcStream, String remoteFile, Boolean append, Boolean alwaysCloseStreams)
DEBUG [FTPConnection] 10 Jan 2017 14:51:34.756 : Closing connection (instance=87)
DEBUG [FTPFileFactory] 10 Jan 2017 14:51:34.756 : Defaulting to Unix parsing
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:34.756 : ---> QUIT
DEBUG [FTPControlSocket] 10 Jan 2017 14:51:34.771 : 221 Goodbye, closing session.

Can anyone help point us in the right direction of what is causing this?

Thanks in advance,

Stuart
by (161k points)
Please post a code snippet that shows what you are doing.
by (120 points)
Hi,

The code is part of a larger helper class so I have stripped out the FTP commands here:

m_ftpConnection = New FTPConnection()
m_ftpConnection.ServerAddress = m_Host
m_ftpConnection.UserName = UserName
m_ftpConnection.Password = Password
m_ftpConnection.Connect()
m_ftpConnection.ConnectMode = FTPConnectMode.PASV
m_ftpConnection.TransferType = FTPTransferType.ASCII
m_ftpConnection.ChangeWorkingDirectory(m_Directory)
 m_ftpConnection.UploadFile(sFilePath, sFileName)
 m_ftpConnection.RenameFile(sFileName, Path.GetFileNameWithoutExtension(sFileName) & ".XML")

It appears that it initially connects to the server and does the file listing fine - it errors when the second PASV command is sent as detailed in the log above.

We are unsure whether the issue is with the FTP server (ServU 15.1) or if it is a problem with the EnterpriseDT component.

Thanks.
by (161k points)
This question seems a bit beyond the scope of the public forum, so please open a support ticket at the URL below and attach a debug log that shows the file listing as well as the second PASV command.

Please log in or register to answer this question.

Categories

...