Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
13.1k views
in .NET FTP by (1.7k points)
OK, I suppose you seen this one before.

I have code for 3 interfaces using the FTP framework.
Actually, it's one program that instanciates 3 workers classes, respectively.

Two jobs, behind the firewall, work without a hitch.
However the third, outside of the firewall, provides my this wonderful jewel:

System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at...

Now, this code replaces EXISTING code that CAN reach the external FTP site.
However that solution, although .NET, is NOT a managed solution.
It is instead spinning a new process that calls the NT FTP command and then processes a script.

So any idea why DOS FTP can access the site but MANAGED FTP cannot?

9 Answers

0 votes
by (162k points)
The DOS FTP is probably using active mode transfers.

So any idea why DOS FTP can access the site but MANAGED FTP cannot?
0 votes
by (1.7k points)
Pardon my ignorance but that means?
And how do I resolve?
Is there something that I must foward to my FIREWALL folks?
Is a FIREWALL block of this nature reasonable?
Assuming I continue to use a managed solution, can I modify the code to work?
0 votes
by (162k points)
Have a browse thru

http://www.enterprisedt.com/general/doc ... erview.pdf

There is an API call to change transfer modes, see

http://www.enterprisedt.com/products/ed ... tMode.html

Pardon my ignorance but that means?
And how do I resolve?
Is there something that I must foward to my FIREWALL folks?
Is a FIREWALL block of this nature reasonable?
Assuming I continue to use a managed solution, can I modify the code to work?
0 votes
by (1.7k points)
Thanks, appreciate the reply.

OK, I compiled the code into a DLL so not sure what happens internally.
Promise to step through the code:)

Regardless, have gone into ACTIVE mode.
I now receive the following error when grabbing remote directory content:

"System.IO.IOException: Unable to read data from the transport connection. ---> System.Net.Sockets.SocketException: Unknown error (0x2746)"

Noticed the documentation surrounds ACTIVE states that PORT command is issued, specifing both Address and port of the client. Am assuming that is automatic eh?

Will compile the code as a project within the solution to determine where the problem lies.
0 votes
by (162k points)
Yes

Noticed the documentation surrounds ACTIVE states that PORT command is issued, specifing both Address and port of the client. Am assuming that is automatic eh?
0 votes
by (1.7k points)
OK, I've stepped through the code and haven't a clue why the error is being generated.

Thanks.
0 votes
by (1.7k points)
Actually, I processed the code @ home in PASV mode and everything worked without a hitch, including FTP'ing to the same site.

But @ work, I get errors both from ACTIVE and PASV, albiet, errors are different.

Suggestions?
0 votes
by (1.7k points)
My experience with FIREWALLS @ the house include both HARDWARE and SOFTWARE related solutions.

The HARDWARE can block anonymous incoming (all) and outgoing (by PORT).

The SOWTWARE (ZONEALARM) can block but anonymous incoming and outgoing (by PORT and program name).

I understand the coprorate firewall can block by IP and PORT alone and of course block anonymous pings coming in.

Assuming the port and IP is OK, do either ACTIVE or PASV constitute anonymous communications from the remote server upon communication back to the client?

Also, does the DIR property use a different port?
Where can I find a concise list of all th ports used by the code?
0 votes
by (162k points)
The FTP Overview document explains how PASV and PORT work - all data transfer commands use this, including directory listing commands.

You might find this page useful:

http://www.ncftp.com/ncftpd/doc/misc/ft ... walls.html


Also, does the DIR property use a different port?
Where can I find a concise list of all th ports used by the code?

Categories

...