Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.9k views
in .NET FTP by
Hi,

I have written a C# Windows Forms app with your edtftpnet 1.1.5 component. The following code works fine on two computers, but on the 3rd I get this error:

No connection could be made because the target machine actively refused it.


---

The target machine is always "members.cox.net". Since I cannot reproduce this error on my machine, I'm not sure what to do. Has anyone seen this error, and do you know what I can do about it?

using EnterpriseDT.Net.Ftp;

...

try
{
   f.ReportStatus("Connecting to server...\r\n");
   FTPClient ftp = new FTPClient(f.journal.server);

   if (DoEvents() && f.canceled)
      return;

   ftp.Login(f.journal.username, Encrypter.Encrypt(f.journal.password));

   if (DoEvents() && f.canceled)
      return;

...


}
catch(Exception ex)
{
   f.ReportError(ex.Message);
   f.btnCancel.Text = "OK";
   return;
}


FYI, it works on a Win2K and XP machine, but fails on an XP machine.

Thanks,
Justin

5 Answers

0 votes
by (162k points)
It is possible that the third machine has a firewall enabled that is not permitting outgoing connections.

Or the FTP server you are trying to connect to isn't running.

You can confirm this if ftp.exe doesn't work either.

Hi,

I have written a C# Windows Forms app with your edtftpnet 1.1.5 component. The following code works fine on two computers, but on the 3rd I get this error:

No connection could be made because the target machine actively refused it.


0 votes
by
Thanks for the reply. He said ftp.exe is working. Normally, if I disallow the outbound connection when my app tries to access the net, the error I get is:

No such host found


or something like that. This error sounds like it is talking to the ftp server, but getting denied. Strange.
0 votes
by (162k points)
Try switching to active transfer mode. ftp.exe uses that by default

Thanks for the reply. He said ftp.exe is working. Normally, if I disallow the outbound connection when my app tries to access the net, the error I get is:

No such host found


or something like that. This error sounds like it is talking to the ftp server, but getting denied. Strange.
0 votes
by
OK, I'll give that a try.

Try switching to active transfer mode. ftp.exe uses that by default
0 votes
by
I went to my friend's house and it seems that his system is corrupted. It was acting weird in a bunch of ways, so I don't think your dll or my app is to blame. Thanks for your help.

Categories

...