I am trying to implement FXP using following code.

		Dim objFXP As New sfFTPLib.FTPFXP

		Dim ftpSource as New sfFTPLib.FTPConnectionMTA

		Dim ftpDest as New sfFTPLib.FTPConnectionMTA

		Dim enumReturned As sfFTPLib.enumError

                        ftpSource.Host = "testServerOne"

                        ftpSource.Port = 21

                        ftpSource.Username = "test"

                        ftpSource.Password = "test"

                        ftpSource.Passive = true

                        ftpSource.DataProtection = enumDataProtection.ftpDataProtectionPrivate

                        ftpDest.Host = "testServerTwo"

                        ftpDest.Port = 21

                        ftpDest.Username = "test"

                        ftpDest.Password = "test"

                        ftpDest.Passive = false

                        ftpDest.DataProtection = enumDataProtection.ftpDataProtectionPrivate

		objFXP.Source = _objFTPS

		objFXP.Destination = objDestination

		enumReturned = objFXP.FXPFile(fileName, fileName, 0, 0)

		If enumReturned = sfFTPLib.enumError.ftpErrorSuccess Then


			'ftpSource .Continue()

			'ftpDest .Continue()


			System.Console.writeLine("Error Ocurred= " & objFXP.LastError.ToString)

		End If

When I execute the above code, it does not always work - sometimes the file is transferred, other times it gives error as "ftpErrorPending" and does nothing, and yet other times it gives the error and the file is transferred completely.

Here is the log for source:

PASV Host:
227 Entering Passive Mode (202,189,230,246,45,110) Host:
Opening data connection to Port: 11630 Host:
MLSD Host:
TransferStart -------------------- Customized message
OnTransferProgress: Low=0, High=0 -------------------- Customized message
150 Opening data connection Host:
1009 bytes transferred. (Unknown/s) (0 ms) Host:
OnTransferEnd -------------------- Customized message
226 Transfer complete Host:
OnTransferInit -------------------- Customized message
DownloadFXPFile: RemoteFile=TestFile.txt, Low=0, High=0 -------------------- Customized message
Error Ocurred= ftpErrorPending

Anyone have suggestions?

Does it working using the SmartFTP client?

Yes, this works with the SmartFTP client.

Please help.

Please provide a sample which reproduces the problem.