Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.7k views
in .NET FTP by (120 points)
Hi,

Got this code:

FTPConnection ftp = new FTPConnection();
ftp.ServerAddress = host;
ftp.UserName = username;
ftp.Password = password;
ftp.Connect();
ftp.Close();


(host, username and password are previously defined strings).
It throws this exception:

Exception: System.SystemException: Unexpected null reply received
   at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
   at EnterpriseDT.Net.Ftp.FTPClient.Quit()
   at EnterpriseDT.Net.Ftp.FTPConnection.Close(Boolean abruptClose)


I have also used the code to get a list of remote files and display them fine but again, whenever I use Close() I get the exception. If I use Close(true) to abruptly close the connection it works, however that's not great practice.

Can you advise?

1 Answer

0 votes
by (51.6k points)
Could you please enable logging at the DEBUG level and post the log here?

Also, can you connect with other FTP clients, such as FileZilla?

- Hans (EnterpriseDT)

Categories

...