Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
8.5k views
in .NET FTP by (320 points)
Hello,

How can I set LogLevel when I use FTPConnection class in console app? From the intellisense, I don't see LogLevel property or any kind of logging/debugging properties available as stated in the documentation.

I'm using edtFTPnetPRO 7.1.

Please help.

TLE

12 Answers

0 votes
by (45.6k points)
It's a static property so it doesn't show up in Intellisense for instance variables. It will show up though if you type "FTPConnection.".

- Hans (EnterpriseDT)
0 votes
by (320 points)
Thanks Hans. I am getting exception as I start uploading a file. My server admin also monitors my connection on his server and he says that he sees my connection connected to the server, but it immediately disconnected. This happens intermittenly before, but not often. It is getting quite frequent (everyday) lately. Some other programs I have that use Microsoft Windows FTP commands work fine. Here is my log contents. Please help.

Tim

[quote]
DEBUG [FTPConnection] 24 Oct 2010 10:08:52.365 : Set LocalDirectory='C:\MyProjects\DotNet\CS\MemConfigurationFiles\MemConfigDELL\bin\Debug'
DEBUG [FTPClient] 24 Oct 2010 10:08:52.381 : Connecting to ftp.kingston.com:21
DEBUG [HostNameResolver] 24 Oct 2010 10:08:52.678 : Resolving ftp.kingston.com
DEBUG [HostNameResolver] 24 Oct 2010 10:08:52.678 : Obtained 1 addresses
DEBUG [HostNameResolver] 24 Oct 2010 10:08:52.678 : IP address: 12.145.42.8
DEBUG [HostNameResolver] 24 Oct 2010 10:08:52.678 : ftp.kingston.com resolved to 12.145.42.8
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.709 : Setting socket timeout=60
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.709 : Command encoding=System.Text.ASCIIEncoding
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.709 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.756 : 220 Kingston Technology Co. Authorized Access Only!
DEBUG [FTPConnection] 24 Oct 2010 10:08:52.756 : Connected to ftp.kingston.com (instance=0)
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.756 : ---> USER 27tle25
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.787 : 331 User name okay, need password.
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.787 : ---> PASS ********
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.803 : 230 User logged in, proceed.
DEBUG [FTPConnection] 24 Oct 2010 10:08:52.803 : Successfully logged in
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.803 : ---> TYPE I
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.818 : 200 Type set to I.
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.818 : ---> PWD
DEBUG [FTPControlSocket] 24 Oct 2010 10:08:52.818 : 257 "/" is current directory.
DEBUG [FTPConnection] 24 Oct 2010 10:09:11.225 : UploadFile(MEMORY_KINGSTON_EN_US.txt,Dellware\MEMORY_KINGSTON_EN_US.txt,False)
DEBUG [FTPConnection] 24 Oct 2010 10:09:11.240 : Combining absolute path 'C:\MyProjects\DotNet\CS\MemConfigurationFiles\MemConfigDELL\bin\Debug' with relative path 'MEMORY_KINGSTON_EN_US.txt'
DEBUG [FTPControlSocket] 24 Oct 2010 10:09:11.350 : ---> PASV
DEBUG [FTPControlSocket] 24 Oct 2010 10:09:11.646 : 227 Entering Passive Mode (12,145,42,8,17,148)
DEBUG [FTPControlSocket] 24 Oct 2010 10:09:11.646 : Server supplied address=12.145.42.8
DEBUG [FTPControlSocket] 24 Oct 2010 10:09:11.646 : Server supplied port=4500
DEBUG [FTPControlSocket] 24 Oct 2010 10:09:11.646 : Substituting server supplied IP (12.145.42.8)
with remote host IP (12.145.42.8)
DEBUG [FTPControlSocket] 24 Oct 2010 10:09:11.662 : NewPassiveDataSocket(12.145.42.8,4500)
DEBUG [FTPControlSocket] 24 Oct 2010 10:09:11.709 : ---> STOR Dellware\MEMORY_KINGSTON_EN_US.txt
ERROR [FTPControlSocket] 24 Oct 2010 10:09:12.771 : Read failed ('' read so far)
ERROR [FTPControlSocket] 24 Oct 2010 10:09:12.771 : Exception in SendCommand
ERROR [FTPControlSocket] 24 Oct 2010 10:09:12.771 : EnterpriseDT.Net.Ftp.ControlChannelIOException:
Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
ERROR [FTPControlSocket] 24 Oct 2010 10:09:12.771 : at EnterpriseDT.Net.Ftp.FTPControlSocket.nPqqJvmiv()
ERROR [FTPControlSocket] 24 Oct 2010 10:09:12.771 : at EnterpriseDT.Net.Ftp.FTPControlSocket.Ign4Bx5HWG()
ERROR [FTPControlSocket] 24 Oct 2010 10:09:12.771 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
DEBUG [FTPClient] 24 Oct 2010 10:09:12.818 : Closing source stream
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : Caught exception
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPControlSocket.nPqqJvmiv()
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPControlSocket.Ign4Bx5HWG()
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPClient.yVRgq92pF(String , Boolean )
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPClient.UCLNysjHe(Stream , String , Boolean , Boolean )
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : SystemException in Put(string,string,bool)
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPClient.UCLNysjHe(Stream , String , Boolean , Boolean )
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPClient.GQphCRkP4(String , String , Boolean )
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPClient.Put(String localPath, String remoteFile, Boolean append)
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : Exception in ValidateTransferOnError())
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : EnterpriseDT.Net.Ftp.FTPException: The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPClient.Yqfr5SsNt(Boolean )
ERROR [FTPClient] 24 Oct 2010 10:09:12.818 : at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransferOnError()
DEBUG [FTPControlSocket] 24 Oct 2010 10:09:12.818 : Setting socket timeout=60
[/quote]
0 votes
by (45.6k points)
The timeout is in milliseconds, so by setting it to 60 you are setting it to 60ms which is too short to allow the server to respond. Set it to 60,000ms instead.

- Hans (EnterpriseDT)
0 votes
by (320 points)
Hi Hans,

The exception is still there after I increased the timeout = 90000. The error is different this time though.

[quote]
DEBUG [FTPConnection] 25 Oct 2010 08:33:02.556 : Set LocalDirectory='C:\MyProjects\DotNet\CS\MemConfigurationFiles\MemConfigDELL\bin\Debug'
DEBUG [FTPClient] 25 Oct 2010 08:33:02.556 : Connecting to ftp.kingston.com:21
DEBUG [HostNameResolver] 25 Oct 2010 08:33:02.556 : Resolving ftp.kingston.com
DEBUG [HostNameResolver] 25 Oct 2010 08:33:02.556 : Obtained 1 addresses
DEBUG [HostNameResolver] 25 Oct 2010 08:33:02.556 : IP address: 12.145.42.8
DEBUG [HostNameResolver] 25 Oct 2010 08:33:02.556 : ftp.kingston.com resolved to 12.145.42.8
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:02.572 : Setting socket timeout=90000
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:02.572 : Command encoding=System.Text.ASCIIEncoding
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:02.572 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:02.743 : 220 Kingston Technology Co. Authorized Access Only!
DEBUG [FTPConnection] 25 Oct 2010 08:33:02.743 : Connected to ftp.kingston.com (instance=0)
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:02.743 : ---> USER 27tle25
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:04.806 : 331 User name okay, need password.
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:04.806 : ---> PASS ********
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:21.900 : 230 User logged in, proceed.
DEBUG [FTPConnection] 25 Oct 2010 08:33:21.900 : Successfully logged in
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:21.900 : ---> TYPE I
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.118 : 200 Type set to I.
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.118 : ---> PWD
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.134 : 257 "/" is current directory.
DEBUG [FTPConnection] 25 Oct 2010 08:33:26.134 : UploadFile(MEMORY_KINGSTON_EN_US.txt,Dellware\MEMORY_KINGSTON_EN_US.txt,False)
DEBUG [FTPConnection] 25 Oct 2010 08:33:26.134 : Combining absolute path 'C:\MyProjects\DotNet\CS\MemConfigurationFiles\MemConfigDELL\bin\Debug' with relative path 'MEMORY_KINGSTON_EN_US.txt'
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.150 : ---> PASV
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.150 : 227 Entering Passive Mode (12,145,42,8,17,148)
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.150 : Server supplied address=12.145.42.8
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.150 : Server supplied port=4500
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.150 : Substituting server supplied IP (12.145.42.8) with remote host IP (12.145.42.8)
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.150 : NewPassiveDataSocket(12.145.42.8,4500)
DEBUG [FTPControlSocket] 25 Oct 2010 08:33:26.150 : ---> STOR Dellware\MEMORY_KINGSTON_EN_US.txt
ERROR [FTPControlSocket] 25 Oct 2010 08:34:39.353 : Read failed ('' read so far)
ERROR [FTPControlSocket] 25 Oct 2010 08:34:39.353 : Exception in SendCommand
ERROR [FTPControlSocket] 25 Oct 2010 08:34:39.353 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPControlSocket] 25 Oct 2010 08:34:39.353 : at EnterpriseDT.Net.Ftp.FTPControlSocket.nPqqJvmiv()
ERROR [FTPControlSocket] 25 Oct 2010 08:34:39.353 : at EnterpriseDT.Net.Ftp.FTPControlSocket.Ign4Bx5HWG()
ERROR [FTPControlSocket] 25 Oct 2010 08:34:39.353 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
DEBUG [FTPClient] 25 Oct 2010 08:34:39.368 : Closing source stream
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : Caught exception
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPControlSocket.nPqqJvmiv()
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPControlSocket.Ign4Bx5HWG()
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPClient.yVRgq92pF(String , Boolean )
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPClient.UCLNysjHe(Stream , String , Boolean , Boolean )
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : SystemException in Put(string,string,bool)
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPClient.UCLNysjHe(Stream , String , Boolean , Boolean )
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPClient.GQphCRkP4(String , String , Boolean )
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPClient.Put(String localPath, String remoteFile, Boolean append)
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : Exception in ValidateTransferOnError())
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : EnterpriseDT.Net.Ftp.FTPException: The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPClient.Yqfr5SsNt(Boolean )
ERROR [FTPClient] 25 Oct 2010 08:34:39.368 : at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransferOnError()
DEBUG [FTPControlSocket] 25 Oct 2010 08:34:39.368 : Setting socket timeout=90000
[/quote]
0 votes
by (154k points)
Try changing to active mode - could be a firewall problem. Can you connect with Filezilla or ftp.exe?
0 votes
by (320 points)
Hi Hans,

I can still connect and upload files successfully with microsoft windows ftp.exe. I have some other programs that use FTPConnection class from edt. Their behavior is also erratic. For example I upload 2 files, sometimes one file is successfully uploaded and it fails on the second. Sometimes both go through with no problem, but other times it fails right on the first file. Anyway, here is a log file I gathered after changing to Active mode:

[quote]
DEBUG [FTPConnection] 25 Oct 2010 14:21:11.197 : Set LocalDirectory='C:\MyProjects\DotNet\CS\MemConfigurationFiles\MemConfigDELL\bin\Debug'
DEBUG [FTPClient] 25 Oct 2010 14:21:11.197 : Connecting to ftp.kingston.com:21
DEBUG [HostNameResolver] 25 Oct 2010 14:21:11.400 : Resolving ftp.kingston.com
DEBUG [HostNameResolver] 25 Oct 2010 14:21:11.415 : Obtained 1 addresses
DEBUG [HostNameResolver] 25 Oct 2010 14:21:11.415 : IP address: 12.145.42.8
DEBUG [HostNameResolver] 25 Oct 2010 14:21:11.415 : ftp.kingston.com resolved to 12.145.42.8
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:11.431 : Setting socket timeout=90000
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:11.462 : Command encoding=System.Text.ASCIIEncoding
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:11.462 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.743 : 220 Kingston Technology Co. Authorized Access Only!
DEBUG [FTPConnection] 25 Oct 2010 14:21:14.743 : Connected to ftp.kingston.com (instance=0)
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.759 : ---> USER 27tle25
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.884 : 331 User name okay, need password.
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.884 : ---> PASS ********
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.900 : 230 User logged in, proceed.
DEBUG [FTPConnection] 25 Oct 2010 14:21:14.900 : Successfully logged in
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.900 : ---> TYPE I
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.900 : 200 Type set to I.
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.900 : ---> PWD
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:14.915 : 257 "/" is current directory.
DEBUG [FTPConnection] 25 Oct 2010 14:21:25.228 : UploadFile(MEMORY_KINGSTON_EN_US.txt,Dellware\MEMORY_KINGSTON_EN_US.txt,False)
DEBUG [FTPConnection] 25 Oct 2010 14:21:25.228 : Combining absolute path 'C:\MyProjects\DotNet\CS\MemConfigurationFiles\MemConfigDELL\bin\Debug' with relative path 'MEMORY_KINGSTON_EN_US.txt'
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:25.228 : NewActiveDataSocket(0)
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:25.228 : ---> PORT 172,16,16,188,28,2
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:25.665 : 200 PORT command successful.
DEBUG [FTPControlSocket] 25 Oct 2010 14:21:25.665 : ---> STOR Dellware\MEMORY_KINGSTON_EN_US.txt
ERROR [FTPControlSocket] 25 Oct 2010 14:22:39.306 : Read failed ('' read so far)
ERROR [FTPControlSocket] 25 Oct 2010 14:22:39.322 : Exception in SendCommand
ERROR [FTPControlSocket] 25 Oct 2010 14:22:39.322 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPControlSocket] 25 Oct 2010 14:22:39.322 : at EnterpriseDT.Net.Ftp.FTPControlSocket.nPqqJvmiv()
ERROR [FTPControlSocket] 25 Oct 2010 14:22:39.322 : at EnterpriseDT.Net.Ftp.FTPControlSocket.Ign4Bx5HWG()
ERROR [FTPControlSocket] 25 Oct 2010 14:22:39.322 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
DEBUG [FTPClient] 25 Oct 2010 14:22:39.322 : Closing source stream
ERROR [FTPClient] 25 Oct 2010 14:22:39.322 : Caught exception
ERROR [FTPClient] 25 Oct 2010 14:22:39.322 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPClient] 25 Oct 2010 14:22:39.322 : at EnterpriseDT.Net.Ftp.FTPControlSocket.nPqqJvmiv()
ERROR [FTPClient] 25 Oct 2010 14:22:39.322 : at EnterpriseDT.Net.Ftp.FTPControlSocket.Ign4Bx5HWG()
ERROR [FTPClient] 25 Oct 2010 14:22:39.322 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [FTPClient] 25 Oct 2010 14:22:39.322 : at EnterpriseDT.Net.Ftp.FTPClient.yVRgq92pF(String , Boolean )
ERROR [FTPClient] 25 Oct 2010 14:22:39.322 : at EnterpriseDT.Net.Ftp.FTPClient.UCLNysjHe(Stream , String , Boolean , Boolean )
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : SystemException in Put(string,string,bool)
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : at EnterpriseDT.Net.Ftp.FTPClient.UCLNysjHe(Stream , String , Boolean , Boolean )
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : at EnterpriseDT.Net.Ftp.FTPClient.GQphCRkP4(String , String , Boolean )
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : at EnterpriseDT.Net.Ftp.FTPClient.Put(String localPath, String remoteFile, Boolean append)
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : Exception in ValidateTransferOnError())
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : EnterpriseDT.Net.Ftp.FTPException: The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : at EnterpriseDT.Net.Ftp.FTPClient.Yqfr5SsNt(Boolean )
ERROR [FTPClient] 25 Oct 2010 14:22:39.337 : at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransferOnError()
DEBUG [FTPControlSocket] 25 Oct 2010 14:22:39.337 : Setting socket timeout=90000
[/quote]
0 votes
by (45.6k points)
There's a backslash in one of your path, Dellware\MEMORY_KINGSTON_EN_US.txt. FTP uses UNIX-like paths with forward-slashes.

- Hans (EnterpriseDT)
0 votes
by (320 points)
Hi Hans,

Thanks for your help. That seems to fix the issue. It is still very weird though.

I have a same program that runs separately from 2 different folders. The only different is the variables to get different data to create the output files to upload. This program was having connection problem as described above. After I follow your suggestion to use the forward slash instead of backward slash, I rebuilt the program and coppied it to one of the two folders to test. While the other folder still had the old executable.

Now both new and old executables work without any issue. You have idea what would be the issue that caused them to fail?

/Tim
0 votes
by (45.6k points)
No, not really. Maybe I could see if I had the logs.

- Hans (EnterpriseDT)
0 votes
by (320 points)
Hi Hans,

It doesn't seem to be working consistently. The same program now throwing out the same error, even I have use forward slash (unix style)

[quote]
DEBUG [FTPConnection] 1 Nov 2010 10:05:47.059 : Set LocalDirectory='C:\MyProjects\DotNet\CS\MemConfigurationFiles\MemConfigDELL\bin\Debug'
DEBUG [FTPClient] 1 Nov 2010 10:05:47.059 : Connecting to ftp.kingston.com:21
DEBUG [HostNameResolver] 1 Nov 2010 10:05:47.075 : Resolving ftp.kingston.com
DEBUG [HostNameResolver] 1 Nov 2010 10:05:47.075 : Obtained 1 addresses
DEBUG [HostNameResolver] 1 Nov 2010 10:05:47.075 : IP address: 12.145.42.8
DEBUG [HostNameResolver] 1 Nov 2010 10:05:47.075 : ftp.kingston.com resolved to 12.145.42.8
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:47.075 : Setting socket timeout=90000
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:47.075 : Command encoding=System.Text.ASCIIEncoding
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:47.075 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.153 : 220 Kingston Technology Co. Authorized Access Only!
DEBUG [FTPConnection] 1 Nov 2010 10:05:51.153 : Connected to ftp.kingston.com (instance=0)
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.153 : ---> USER 27tle25
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.497 : 331 User name okay, need password.
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.497 : ---> PASS ********
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.512 : 230 User logged in, proceed.
DEBUG [FTPConnection] 1 Nov 2010 10:05:51.512 : Successfully logged in
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.512 : ---> TYPE I
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.512 : 200 Type set to I.
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.512 : ---> PWD
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:51.528 : 257 "/" is current directory.
DEBUG [FTPControlSocket] 1 Nov 2010 10:05:59.215 : ---> SIZE tle
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:00.590 : 550 /tle: Is a directory.
DEBUG [FTPClient] 1 Nov 2010 10:06:00.590 : SIZE not supported
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:00.590 : ---> MDTM tle
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:03.325 : 213 20101025212556.265
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:24.137 : ---> CWD tle
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:24.747 : 250 Directory changed to /Tle
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:24.747 : ---> PWD
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:24.762 : 257 "/Tle" is current directory.
DEBUG [FTPConnection] 1 Nov 2010 10:06:37.997 : UploadFile(MEMORY_KINGSTON_EN_US.txt,Dellware/MEMORY_KINGSTON_EN_US.txt,False)
DEBUG [FTPConnection] 1 Nov 2010 10:06:37.997 : Combining absolute path 'C:\MyProjects\DotNet\CS\MemConfigurationFiles\MemConfigDELL\bin\Debug' with relative path 'MEMORY_KINGSTON_EN_US.txt'
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:37.997 : NewActiveDataSocket(0)
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:37.997 : ---> PORT 172,16,16,188,110,38
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:41.700 : 200 PORT command successful.
DEBUG [FTPControlSocket] 1 Nov 2010 10:06:41.700 : ---> STOR Dellware/MEMORY_KINGSTON_EN_US.txt
ERROR [FTPControlSocket] 1 Nov 2010 10:07:32.106 : Read failed ('' read so far)
ERROR [FTPControlSocket] 1 Nov 2010 10:07:32.106 : Exception in SendCommand
ERROR [FTPControlSocket] 1 Nov 2010 10:07:32.106 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPControlSocket] 1 Nov 2010 10:07:32.106 : at EnterpriseDT.Net.Ftp.FTPControlSocket.nPqqJvmiv()
ERROR [FTPControlSocket] 1 Nov 2010 10:07:32.106 : at EnterpriseDT.Net.Ftp.FTPControlSocket.Ign4Bx5HWG()
ERROR [FTPControlSocket] 1 Nov 2010 10:07:32.106 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
DEBUG [FTPClient] 1 Nov 2010 10:07:32.122 : Closing source stream
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : Caught exception
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPControlSocket.nPqqJvmiv()
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPControlSocket.Ign4Bx5HWG()
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPClient.yVRgq92pF(String , Boolean )
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPClient.UCLNysjHe(Stream , String , Boolean , Boolean )
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : SystemException in Put(string,string,bool)
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPClient.UCLNysjHe(Stream , String , Boolean , Boolean )
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPClient.GQphCRkP4(String , String , Boolean )
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPClient.Put(String localPath, String remoteFile, Boolean append)
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : Exception in ValidateTransferOnError())
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : EnterpriseDT.Net.Ftp.FTPException: The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPClient.Yqfr5SsNt(Boolean )
ERROR [FTPClient] 1 Nov 2010 10:07:32.122 : at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransferOnError()
DEBUG [FTPControlSocket] 1 Nov 2010 10:07:32.122 : Setting socket timeout=90000
[/quote]

Categories

...