Unable to read data from the transport connection

Jul 2, 2010 at 5:40 AM

Hi Alex,

I am getting this error when trying to connect to an ftps server:

Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.

Code:

client.Connect(ftpsite,
                           new NetworkCredential(username,
                                                 password),
                           ESSLSupportMode.CredentialsRequired);

(Note: seems like it connects fine)


client.GetFile("/HB44_062410.zip", "c:\\a\\");

(Note: get error message on the GetFile call)

FileZilla log:

Status:    Connecting to 207.152.14.29:21...
Status:    Connection established, waiting for welcome message...
Response:    220 This is the SA Secure FTP Site.  Unauthorized use of this FTP site is strictly prohibited.
Command:    AUTH TLS
Response:    234 AUTH command ok. Expecting TLS Negotiation.
Status:    Initializing TLS...
Status:    Verifying certificate...
Command:    USER datauser
Status:    TLS/SSL connection established.
Response:    331 Password required for datauser.
Command:    PASS ********
Response:    230 User logged in.
Command:    SYST
Response:    215 Windows_NT
Command:    FEAT
Response:    211-Extended features supported:
Response:     LANG EN*
Response:     UTF8
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
Command:    OPTS UTF8 ON
Response:    200 OPTS UTF8 command successful - UTF8 encoding now ON.
Command:    PBSZ 0
Response:    200 PBSZ command successful.
Command:    PROT P
Response:    200 PROT command successful.
Status:    Connected
Status:    Retrieving directory listing...
Command:    PWD
Response:    257 "/" is current directory.
Command:    TYPE I
Response:    200 Type set to I.
Command:    PASV
Response:    227 Entering Passive Mode (207,152,14,29,184,200).
Command:    LIST
Response:    150 Opening BINARY mode data connection.
Response:    226 Transfer complete.
Status:    Calculating timezone offset of server...
Command:    MDTM HB44_022310.zip
Response:    213 20100224212638
Status:    Timezone offsets: Server: -18000 seconds. Local: -25200 seconds. Difference: -7200 seconds.
Status:    Directory listing successful

 

Any thoughts would be appreciated.

Thanks,

James

Coordinator
Jul 16, 2010 at 6:46 PM
Edited Aug 2, 2010 at 10:23 AM

Hi James, sorry for the late reply,

I've been a bit on vacation lately :-)

coming to your issue, from your log it looks like you are using SSL/TLS in both your control and data connections, but using our client you are emplying encryption during login only (CredentialsRequired).

Did you try with ESSLSupportMode.All?

E.g.: lient.Connect(ftpsite, new NetworkCredential(username, password), ESSLSupportMode.All);

you might also try "ESSLSupportMode.DataChannelRequested | ESSLSupportMode.CredentialsRequired" if you just want to enforce the latter.

Let me know!

Cheers,

Alessandro Pilotti [MVP / IIS]

Aug 2, 2010 at 9:33 AM

Hi Alex,

I've the same exception during my downloads.

Unable to read data from the transport connection : A connection attempt failed because the connected party did not properly respond after a certain time, or established connection failed because connected host has not responded.

The dowload begin correctly, and avec few secondes never the same delay ), the download freeze, and this exception is throw.

I Use SSL connection and ESSLSupportMode.DataChannelRequired.

 

Sometimes, i have this exception also after few secondes of download :

Unable to read data from the transport connection : A connection attempt failed because the connected party did not properly respond after a certain time, or established connection failed because connected host has not responded.


any ideas ?

 

thanks,

 

Pyroa.

Coordinator
Aug 2, 2010 at 10:27 AM

Hi Pyroa,

this happens opening the data channel and is  usually related to:

  • FTP client settings mismatch (explicit / implicit / SSL over data channel or credentials only / etc)
  • Firewall settings preventing encrypted data connections

Do you manage to connect using FileZilla or other desktop clients?

In case could you please post a log from filezilla?

 

Cheers,

Alessandro Pilotti

[MVP / IIS]

 

 

Aug 2, 2010 at 1:22 PM
Edited Aug 2, 2010 at 1:23 PM

See below the CuteFTP log :

 

 

		*** CuteFTP 7.0 - build Jun  7 2005 ***

STATUS:>  	Getting listing ""...
STATUS:>  	Resolving host name ****************...
STATUS:>  	Host name **************** resolved: ip = ***.***.***.***.
STATUS:>  	Connecting to FTP server ****************:21 (ip = ***.***.***.***)...
STATUS:>  	Socket connected. Waiting for welcome message...
		220 feftsprod4 FTP server (SecureTransport 4.7.2) ready.
STATUS:>  	Connected. Authenticating...
COMMAND:>	AUTH TLS
		234 SSLv23/TLSv1
STATUS:>  	Establishing SSL session.
STATUS:>  	Connected. Exchanging encryption keys...
STATUS:>  	SSL Connect time: 234 ms.
STATUS:>  	SSL encrypted session established.
COMMAND:>	PBSZ 0
		200 PBSZ=0
COMMAND:>	USER ***************************************
		331 Password required for ***************************************.
COMMAND:>	PASS *****
		230 Virtual user *************************************** logged in.
STATUS:>  	Login successful.
COMMAND:>	PWD
		257 "/" is current directory.
STATUS:>  	Home directory: /
COMMAND:>	FEAT
		211-Extensions supported
		 AUTH
		 USER
		 PASS
		 QUIT
		 PORT
		 PASV
		 EPSV
		 TYPE
		 STRU
		 MODE
		 RETR
		 STOR
		 ABOR
		 DELE
		 CWD
		 XCWD
		 LIST
		 NLST
		 SITE
		 SYST
		 STAT
		 HELP
		 NOOP
		 MKD
		 XMKD
		 RMD
		 XRMD
		 PWD
		 XPWD
		 CDUP
		 XCUP
		 SIZE
		 MDTM
		 RNFR
		 RNTO
		 REST
		 FEAT
		 ADAT
		 PROT
		 PBSZ
		 APPE
		 XCRC
		 CCC
		 COMB
		 UTF8
		211 END
STATUS:>  	This site supports features.
STATUS:>  	This site supports XCRC.
STATUS:>  	This site supports SIZE.
STATUS:>  	This site can resume broken downloads.
COMMAND:>	REST 0
		350 Restarting at 0.
COMMAND:>	PBSZ 0
		200 PBSZ=0
COMMAND:>	PROT P
		200 PROT command successful
COMMAND:>	CCC
		200 command channel cleared.
COMMAND:>	PASV
		227 Entering Passive Mode (***,***,***,***,239,190)
COMMAND:>	LIST
STATUS:>  	Connecting FTP data socket ***.***.***.***:61374...
		150 Opening ASCII mode SSL data connection for file list.
STATUS:>  	Connected. Exchanging encryption keys...
STATUS:>  	SSL Connect time: 94 ms.
STATUS:>  	SSL encrypted session established.
		226 Transfer complete.
STATUS:>  	Directory listing completed.
COMMAND:>	TYPE A
		200 Type set to A.
COMMAND:>	TYPE I
		200 Type set to I.

 

 

It's impossible to connect with filezilla on this server because the clear command channel is required, and this programm don't support this command. The more suprising, it's that few days ago my application was working fine ...

Thanks for your answer.

Pyroa.

PS : one suggestion , the possibility to select the command supported by the server ( like the OPTS command is not supported by my server and i have to managed the exception throw by the send of this commadn by your client )

 

Aug 3, 2010 at 8:19 AM

this error :

Unable to read data from the transport connection : A connection attempt failed because the connected party did not properly respond after a certain time, or established connection failed because connected host has not responded.

Is raised on the "GetFile" method. But if I try to launch another download i've this error :

Cannot issue a new command while waiting for a previous one to complete

How i can stop the previous command after the exception on "Getfile" ? Because the FileTransferCallback, is not called and i can't set the cancel parameter to true.

Coordinator
Aug 3, 2010 at 10:26 AM

Hi,

looking at your connection log, the CCC command brings the communication back in clear text, as you also point out talking about FileZilla.

As you write in your previous post:

> I Use SSL connection and ESSLSupportMode.DataChannelRequired.

You should use SSLSupportMode.CredentialsRequired in this case. Basically you have to revert to clear text after passing the credentials. 

Let me know if this works for you!

Alessandro Pilotti

[ MVP / IIS ] 

Aug 3, 2010 at 11:23 AM
Edited Aug 3, 2010 at 11:26 AM

I will tried but, why it's working, and the problem comes during the download ?

and how you change the support mode of SSL ? We can only set it with the Connect method ?

Coordinator
Aug 3, 2010 at 11:40 AM

In FTP you have two channels: a control channel and a data channel on two distinct TCP/IP connections.

Here's a quick general workflow with SSL/TLS in your case (credentials encrypted only):

  1. The client connects on port 21
  2. switches to SSL/TLS (AUTH TLS command)
  3. Provides credentials
  4. switches back to clear text (CCC command)
  5. requests a passive data channel (PASV command) receiving a TCP/IP address + port to connect to
  6. opens the channel and performs the required command (e.g. GET to download a file or LIST to list directory content)

"Connect" covers steps from 1 to 4. Step 4 is not performed if you request to have all communication encrypted which means that:

Firewalls are not able to inspect traffic (PASV command) and thus the data channel port is blocked and you receive a connection refused/timeout answer.

> and how you change the support mode of SSL ? We can only set it with the Connect method ?

There's no need to switch back and forth from clear text to SSL. This is also unsupported by most FTP server.

 

Cheers,

Alessandro Pilotti

[ MVP / IIS ]

 

 

Aug 3, 2010 at 11:54 AM
Edited Aug 3, 2010 at 11:58 AM
alexp wrote:

In FTP you have two channels: a control channel and a data channel on two distinct TCP/IP connections.

Here's a quick general workflow with SSL/TLS in your case (credentials encrypted only):

  1. The client connects on port 21
  2. switches to SSL/TLS (AUTH TLS command)
  3. Provides credentials
  4. switches back to clear text (CCC command)
  5. requests a passive data channel (PASV command) receiving a TCP/IP address + port to connect to
  6. opens the channel and performs the required command (e.g. GET to download a file or LIST to list directory content)

"Connect" covers steps from 1 to 4. Step 4 is not performed if you request to have all communication encrypted which means that:

Firewalls are not able to inspect traffic (PASV command) and thus the data channel port is blocked and you receive a connection refused/timeout answer.

> and how you change the support mode of SSL ? We can only set it with the Connect method ?

There's no need to switch back and forth from clear text to SSL. This is also unsupported by most FTP server.

 

Cheers,

Alessandro Pilotti

[ MVP / IIS ]

Yes i'm agree with you

my code used for the connection :


User_Authentification = New NetworkCredential(Account_Name, Password_Account)

Local_Client = New AlexPilotti.FTPS.Client.FTPSClient

Local_Client.Connect(G_Server_Address, _
 User_Authentification, _
 AlexPilotti.FTPS.Client.ESSLSupportMode.DataChannelRequired, _
 New RemoteCertificateValidationCallback(AddressOf Accept_Certificate))


 Is working.
 But for exemple, on a file of 650Mo the download begin, and after 250Mo downloaded, i've this error message. So that means my connection to the server is good, but anything is happening during the transmission ...
For you is the firewall ? Ok i will seen that with the system responsible when he comes back from his holidays :)
Coordinator
Aug 3, 2010 at 1:20 PM

Hi,

this sounds interesting. It might be possible that the timeout happens on the control channel and thus the server closes the data channel (which is the one where you are receiving the file).

If that's the case, a solution would be to add a thread that periodically "pings" on the control channel with a status message, as a "keep alive" feature. I'll let you know as soon as I get time to add it.

Based on the FTP standard, this is not needed, but there's plenty of faulty server implementations.

 

Alessandro Pilotti

[ MVP / IIS ]

 

Aug 3, 2010 at 1:26 PM
alexp wrote:

Hi,

this sounds interesting. It might be possible that the timeout happens on the control channel and thus the server closes the data channel (which is the one where you are receiving the file).

If that's the case, a solution would be to add a thread that periodically "pings" on the control channel with a status message, as a "keep alive" feature. I'll let you know as soon as I get time to add it.

Based on the FTP standard, this is not needed, but there's plenty of faulty server implementations.

 

Alessandro Pilotti

[ MVP / IIS ]

 

 

Yes, i think that this server is not a standard, because my customer like, to grant security, create their own applications.

Thank to have take some time for reply. I'm waiting for a new release :)

<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>FR</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="--" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} p {mso-style-noshow:yes; mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page WordSection1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} --><!--[if gte mso 10]> <mce:style><! /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tableau Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} --> <!--[endif]-->

Hi,

this sounds interesting. It might be possible that the timeout happens on the control channel and thus the server closes the data channel (which is the one where you are receiving the file).

If that's the case, a solution would be to add a thread that periodically "pings" on the control channel with a status message, as a "keep alive" feature. I'll let you know as soon as I get time to add it.

Based on the FTP standard, this is not needed, but there's plenty of faulty server implementations.