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

after establishing a connection to a FTP-Server behind a NAT-Router (with the help of "AutoPassiveIPSubstitution") the "PASV" command (ConnectMode=FTPConnectMode.PASV) failes with the message: "Unable to read data from the transport connection".

This happens on my windows mobile 5 device over a gprs-connection. However when I run the same application with an activeSync-connection it works. Furthermore when I run the application via GPRS an connect to a server which is NOT behind a NAT-Router it works as well.

Any idea what is going wrong here ?

thanx,
Lucas Henschke

4 Answers

0 votes
by (162k points)
Does the same IP address get sent in the PASV response sent by the server re GPRS and active sync?

If it is the same (and the correct) IP address and port that the data socket is trying to connect to in each case, then somehow the NAT router is preventing your client from connecting when on GPRS.

If you have another FTP client on your device, see if it has the same problem. Enable logging and see if that gives any further clues.
0 votes
by (160 points)
> Does the same IP address get sent in the PASV response sent by the server re GPRS and active sync?

I cannot say that because when I use GPRS I do not get that far. Here is my log (I skiped the boring parts and manually changed the ip):


DEBUG [ExFTPClient] 9 Jan 1980 21:38:36.000 : Connecting to 111.111.111.111:21
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:38.000 : Setting socket timeout=120000
DEBUG [ExFTPControlSocket] 9 Jan 1980 21:38:38.000 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=111.111.111.1, controlPort=21, timeout=120000
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:38.000 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:39.000 : 220 "Welcome to 111 FTP service."
DEBUG [FTPConnection] 9 Jan 1980 21:38:39.000 : Connected to 111.111.111.111
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:39.000 : ---> USER user
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection] 9 Jan 1980 21:38:39.000 : Starting KeepAlive thread with period 30s
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:40.000 : 331 Please specify the password.
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:40.000 : ---> PASS ********
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:41.000 : 230 Login successful. Have fun.
DEBUG [FTPConnection] 9 Jan 1980 21:38:41.000 : Successfully logged in
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:41.000 : ---> TYPE I
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:42.000 : 200 Switching to Binary mode.
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:42.000 : ---> PWD
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:42.000 : 257 "/"
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:42.000 : ---> SYST
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:43.000 : 215 UNIX Type: L8
DEBUG [FTPFileFactory] 9 Jan 1980 21:38:43.000 : Selected UNIX parser
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:43.000 : ---> PWD
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:44.000 : 257 "/"
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:44.000 : ---> PASV
ERROR [FTPControlSocket] 9 Jan 1980 21:38:49.000 : Exception in SendCommand : System.IO.IOException: Unable to read data from the transport connection.
System.IO.IOException: Unable to read data from the transport connection.
CAUSED BY:
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
ERROR [EnterpriseDT.Net.Ftp.ExFTPConnection] 9 Jan 1980 21:38:49.000 : Command error : System.IO.IOException: Unable to read data from the transport connection.


As you can see I do not even get the answer from the server. When I use ActiveSync though I get the expected response to my PASV command and everything works as intended.

> If you have another FTP client on your device, see if it has the same problem.

I used the IPWorks library as well which can connect to the same server via GPRS. But it has it
0 votes
by (140 points)
How can I get more speed from my gprs wireless card? I used gprs wireless card for internet browsing, but its speed so slow. To get more speed I contacted with the local phone co. They told me that they don't control the speed & it is vary for my own network setting. How can I setting the network to get more browsing speed? Please help me!!
_____________
external keyword tool ~ keyworddiscovery.com ~ keycompete.com ~ compete.com ~ webmasterworld.com
0 votes
by (51.6k points)
Sorry Brynnax, I don't know how you can do that. We specialize in FTP and similar protocols, which operate at a higher level than GPRS, so we're not really experts on the ins and outs of GPRS.

- Hans (EnterpriseDT)

Categories

...