I am opening a passive FTP connection to a server tha accepts both FTP and SFTP connections. One I run an exists command using the SFTP connection I don't get any exceptions if I run the same code with an FTP connection I'm getting the following exception:
EnterpriseDT.Net.Ftp.FTPException: Unable to determine if file 'test' exists..
Here is the debug log
DEBUG [FTPConnection] 2 Aug 2012 12:37:35.626 : Set LocalDirectory='C:\svn\dev\branches\Product\Solution\TestResults\Framework _2012-08-02 12_37_34_\Out'
DEBUG [SecureFTPConnection] 2 Aug 2012 12:37:35.626 : Set LocalDirectory to C:\svn\dev\branches\Product\Solution\TestResults\Framework _2012-08-02 12_37_34_\Out
INFO [LicenseProperties] 2 Aug 2012 12:37:35.628 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 2 Aug 2012 12:37:35.628 : Production license
DEBUG [SSLFTPClient] 2 Aug 2012 12:37:35.628 : Connecting to sftp.mercent.com:21
DEBUG [SSLFTPControlSocket] 2 Aug 2012 12:37:35.629 : waitOnShutdownSSL=True
DEBUG [HostNameResolver] 2 Aug 2012 12:37:35.638 : Resolving sftp.mercent.com
DEBUG [HostNameResolver] 2 Aug 2012 12:37:35.642 : Obtained 1 addresses
DEBUG [HostNameResolver] 2 Aug 2012 12:37:35.642 : IP address: 184.72.102.212
DEBUG [HostNameResolver] 2 Aug 2012 12:37:35.642 : sftp.mercent.com resolved to 184.72.102.212
DEBUG [ExFTPControlSocket] 2 Aug 2012 12:37:35.642 : Connecting directly to ftp-server sftp.mercent.com:21
INFO [SSLFTPSocket] 2 Aug 2012 12:37:35.643 : Connecting to 184.72.102.212:21 with timeout 0 ms
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.716 : Setting socket timeout=0
INFO [FTPControlSocket] 2 Aug 2012 12:37:35.718 : Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [ExFTPControlSocket] 2 Aug 2012 12:37:35.718 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=sftp.mercent.com, controlPort=21, timeout=0
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.720 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.788 : 220-Microsoft FTP Service
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.788 : 220 Welcome
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.792 : ---> USER Testftp1
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.864 : 331 Password required for Testftp1.
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.865 : ---> PASS ********
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.937 : 230 User logged in.
DEBUG [FTPConnection] 2 Aug 2012 12:37:35.937 : Successfully logged in
DEBUG [ExFTPConnection] 2 Aug 2012 12:37:35.939 : Starting KeepAlive thread with period 30s
INFO [FTPConnection] 2 Aug 2012 12:37:35.939 : Auto FEAT disabled
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:35.940 : ---> TYPE I
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.012 : 200 Type set to I.
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.012 : ---> PWD
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.136 : 257 "/" is current directory.
DEBUG [FTPConnection] 2 Aug 2012 12:37:36.138 : Exists(test)
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.139 : ---> SIZE test
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.212 : 550 Access is denied.
DEBUG [FTPClient] 2 Aug 2012 12:37:36.213 : SIZE not supported
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.213 : ---> MDTM test
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.284 : 550 The specified path is invalid.
DEBUG [FTPClient] 2 Aug 2012 12:37:36.284 : MDTM not supported
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.286 : ---> PORT 172,18,2,120,242,246
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.358 : 200 PORT command successful.
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.358 : ---> RETR test
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.431 : 550 Access is denied.
WARN [FTPClient] 2 Aug 2012 12:37:36.431 : Unable to determine if file 'test' exists.
DEBUG [FTPConnection] 2 Aug 2012 12:37:36.436 : Closing connection (instance=0)
DEBUG [FTPFileFactory] 2 Aug 2012 12:37:36.437 : Defaulting to Unix parsing
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.437 : ---> QUIT
DEBUG [ExFTPConnection] 2 Aug 2012 12:37:36.440 : KeepAlive thread finished.
DEBUG [FTPControlSocket] 2 Aug 2012 12:37:36.510 : 221 Goodbye.
DEBUG [SecureSocket] 2 Aug 2012 12:37:36.511 : Shutdown(Both)
I've tried both active and passive connections.
Help!
Thanks,
Kathy