automatically changes to PORT

Advertisement

ANNA3
Guest

automatically changes to PORT

FluentFTP -- LOG

Please Help me.
I set it to rcFTP.Config.DataConnectionType = FtpDataConnectionType.PASV, dstFTP.Config.DataConnectionType = FtpDataConnectionType.PASV.
but
Command: PASV
Status: Waiting for response to: PASV
Response: 227 Entering Passive Mode (12,57,200,26,14,13). [15ms]
Command: PORT 12,57,200,26,14,13 <============ automatically changes to PORT

=================

# Connect(False)
Status: FluentFTP 49.0.2.0(.NET Framework 4.7.2)
Status: Connecting to IP #1= ***:21
Status: Waiting for a response
Response: 220 Microsoft FTP Service [738989.961d]
Status: Detected FTP server: WindowsServerIIS
Command: USER ***
Status: Waiting for response to: USER ***
Response: 331 Password required [15ms]
Command: PASS ***
Status: Waiting for response to: PASS ***
Response: 230 User logged in. [<1ms]
Command: FEAT
Status: Waiting for response to: FEAT
Response: 211-Extended features supported:
Response: AUTH TLS;TLS-C;SSL;TLS-P;
Response: PBSZ
Response: PROT C;P;
Response: CCC
Response: HOST
Response: SIZE
Response: MDTM
Response: REST STREAM
Response: 211 END [15ms]
Status: Text encoding: System.Text.ASCIIEncoding
Command: SYST
Status: Waiting for response to: SYST
Response: 215 Windows_NT [<1ms]
Status: Active ServerHandler is: WindowsServerIIS
Status: Listing parser set to: Windows
Command: PWD
Status: Waiting for response to: PWD
Response: 257 "/" is current directory. [15ms]

# Connect(False)
Status: FluentFTP 49.0.2.0(.NET Framework 4.7.2)
Status: Connecting to IP #1= ***:21
Status: Waiting for a response
Response: 220 Microsoft FTP Service [738989.961d]
Status: Detected FTP server: WindowsServerIIS
Command: USER ***
Status: Waiting for response to: USER ***
Response: 331 Password required [15ms]
Command: PASS ***
Status: Waiting for response to: PASS ***
Response: 230 User logged in. [6ms]
Command: FEAT
Status: Waiting for response to: FEAT
Response: 211-Extended features supported:
Response: AUTH TLS;TLS-C;SSL;TLS-P;
Response: PBSZ
Response: PROT C;P;
Response: CCC
Response: HOST
Response: SIZE
Response: MDTM
Response: REST STREAM
Response: 211 END [<1ms]
Status: Text encoding: System.Text.ASCIIEncoding
Command: SYST
Status: Waiting for response to: SYST
Response: 215 Windows_NT [<1ms]
Status: Active ServerHandler is: WindowsServerIIS
Status: Listing parser set to: Windows
Command: PWD
Status: Waiting for response to: PWD
Response: 257 "/" is current directory. [<1ms]

# TransferDirectory("/test1/", FluentFTP.FtpClient, "/test1/", Update, Skip, None, null)

# DirectoryExists("/test1")
Command: CWD /test1
Status: Waiting for response to: CWD /test1
Response: 250 CWD command successful. [<1ms]
Command: CWD /
Status: Waiting for response to: CWD /
Response: 250 CWD command successful. [<1ms]

# DirectoryExists("/test1")
Command: CWD /test1
Status: Waiting for response to: CWD /test1
Response: 250 CWD command successful. [15ms]
Command: CWD /
Status: Waiting for response to: CWD /
Response: 250 CWD command successful. [<1ms]

# GetListing("/test1", Auto)
Command: TYPE I
Status: Waiting for response to: TYPE I
Response: 200 Type set to I. [<1ms]

# OpenDataStream("LIST /test1", 0)

# OpenPassiveDataStream(PASV, "LIST /test1", 0)
Command: PASV
Status: Waiting for response to: PASV
Response: 227 Entering Passive Mode (12,57,200,25,219,183). [15ms]
Status: Connecting to IP #1= ***:56247
Command: LIST /test1
Status: Waiting for response to: LIST /test1
Response: 125 Data connection already open; Transfer starting. [<1ms]
+---------------------------------------+
Listing: 04-10-24 03:02PM 1362327 image.tif
Listing: 04-13-24 11:07AM 5 test1.txt
-----------------------------------------
Status: Closing/Disposing FtpSocketStream(data connection)

# CloseDataStream()
Status: Waiting for response to: LIST /test1
Response: 226 Transfer complete. [15ms]
Status: Closing/Disposing FtpSocketStream(data connection)
Status: Confirmed format Windows

# GetListing("/test1", Auto)
Command: TYPE I
Status: Waiting for response to: TYPE I
Response: 200 Type set to I. [<1ms]

# OpenDataStream("LIST /test1", 0)

# OpenPassiveDataStream(PASV, "LIST /test1", 0)
Command: PASV
Status: Waiting for response to: PASV
Response: 227 Entering Passive Mode (12,57,200,26,14,13). [<1ms]
Status: Connecting to IP #1= ***:3597
Command: LIST /test1
Status: Waiting for response to: LIST /test1
Response: 125 Data connection already open; Transfer starting. [<1ms]
+---------------------------------------+
-----------------------------------------
Status: Closing/Disposing FtpSocketStream(data connection)

# CloseDataStream()
Status: Waiting for response to: LIST /test1
Response: 226 Transfer complete. [15ms]
Status: Closing/Disposing FtpSocketStream(data connection)

# GetListing("/test1", Auto)

# OpenDataStream("LIST /test1", 0)

# OpenPassiveDataStream(PASV, "LIST /test1", 0)
Command: PASV
Status: Waiting for response to: PASV
Response: 227 Entering Passive Mode (12,57,200,25,219,184). [15ms]
Status: Connecting to IP #1= ***:56248
Command: LIST /test1
Status: Waiting for response to: LIST /test1
Response: 125 Data connection already open; Transfer starting. [<1ms]
+---------------------------------------+
Listing: 04-10-24 03:02PM 1362327 image.tif
Listing: 04-13-24 11:07AM 5 test1.txt
-----------------------------------------
Status: Closing/Disposing FtpSocketStream(data connection)

# CloseDataStream()
Status: Waiting for response to: LIST /test1
Response: 226 Transfer complete. [15ms]
Status: Closing/Disposing FtpSocketStream(data connection)

# GetFileSize("/test1/image.tif")
Command: SIZE /test1/image.tif
Status: Waiting for response to: SIZE /test1/image.tif
Response: 213 1362327 [<1ms]

# GetFileSize("/test1/test1.txt")
Command: SIZE /test1/test1.txt
Status: Waiting for response to: SIZE /test1/test1.txt
Response: 213 5 [<1ms]

# TransferServerFiles("2 files")

# TransferFile("/test1/image.tif", FluentFTP.FtpClient, "/test1/image.tif", Binary, False, NoCheck, None)

# FileExists("/test1/image.tif")
Command: SIZE /test1/image.tif
Status: Waiting for response to: SIZE /test1/image.tif
Response: 213 1362327 [<1ms]
Command: PASV
Status: Waiting for response to: PASV
Response: 227 Entering Passive Mode (12,57,200,26,14,13). [15ms]
Command: PORT 12,57,200,26,14,13
Status: Waiting for response to: PORT 12,57,200,26,14,13
Response: 501 Server cannot accept argument. [<1ms]
Warning: File failed to transfer: /test1/image.tif

# TransferFile("/test1/test1.txt", FluentFTP.FtpClient, "/test1/test1.txt", Binary, False, NoCheck, None)

# FileExists("/test1/test1.txt")
Command: SIZE /test1/test1.txt
Status: Waiting for response to: SIZE /test1/test1.txt
Response: 213 5 [<1ms]
Command: PASV
Status: Waiting for response to: PASV
Response: 227 Entering Passive Mode (12,57,200,26,14,13). [<1ms]
Command: PORT 12,57,200,26,14,13
Status: Waiting for response to: PORT 12,57,200,26,14,13
Response: 501 Server cannot accept argument. [<1ms]
Warning: File failed to transfer: /test1/test1.txt
=============

string sourcefolder = @"/test1";
string dstfolder = @"/test26";

var srcFTP = new FtpClient(host, user, pass, port);
srcFTP.Config.LogToConsole = true;
srcFTP.Config.DataConnectionType = FtpDataConnectionType.PASV;
srcFTP.Connect();

var dstFTP = new FtpClient(host1, user1, pass1, port1);
dstFTP.Config.LogToConsole = true;
dstFTP.Config.DataConnectionType = FtpDataConnectionType.PASV;
dstFTP.Connect();

var uploadResult = srcFTP.TransferDirectory(sourcefolder, dstFTP, dstfolder, FtpFolderSyncMode.Update, FtpRemoteExists.Skip, FtpVerify.None, null, null);

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum