The firewall is technically at fault rather than your C++ programmer. There
is nothing inherently wrong with not supporting passive FTP - but using
active FTP will not work from behind NAT as a side effect of how NAT works.
Getting the firewall to handle the return path is another way to fix the
problem (which will also cause active FTP to work for the rest of the users
on your network).

You do need a higher end firewall though.

David Connors
da...@connors.com | M +61 417 189 363
Download my v-card: https://www.codify.com/cards/davidconnors
Follow me on Twitter: https://www.twitter.com/davidconnors
Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors


On Thu, Oct 17, 2013 at 5:06 PM, Greg Keogh <g...@mira.net> wrote:

> David, we suspected a firewall at first, but it was ruled out a few days
> ago. If ftp.exe doesn't do PASV at then I was accidentally wasting my time.
> Web searches on this matter now hint that you're right, but I would never
> have guessed such a stupid thing could be true. My little C# client is
> correctly getting files on the FTP server and all I'm doing is this:
> var client = new 
> WebClient<http://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.100).aspx>
> ();
> client.Credentials = new NetworkCredentials("user", "password");
> client.BaseAddress = "ftp://ftp.myserver.com";;
> byte[] buffer = client.DownloadData("getme.txt");
>
> I didn't expect this to work at first, thinking I'd have to change modes
> or properties or some other trickery, but it works! I didn't even have to
> use the 
> FtpWebRequest<http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest(v=vs.100).aspx>class.
>
> Now I think the ball is to be passed over to the C++ programmer to see
> what he's doing that is different. His code is still crashing trying to get
> a file.
>
> Greg
>

Reply via email to