FXP with SFTP

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

			System.Console.writeLine("Success")

			'ftpSource .Continue()

			'ftpDest .Continue()

		Else

			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: 202.189.230.246
227 Entering Passive Mode (202,189,230,246,45,110) Host: 202.189.230.246
Opening data connection to 202.189.230.246 Port: 11630 Host: 202.189.230.246
MLSD Host: 202.189.230.246
TransferStart -------------------- Customized message
OnTransferProgress: Low=0, High=0 -------------------- Customized message
150 Opening data connection Host: 202.189.230.246
1009 bytes transferred. (Unknown/s) (0 ms) Host: 202.189.230.246
OnTransferEnd -------------------- Customized message
226 Transfer complete Host: 202.189.230.246
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.