Ad

Device Emulator And FTP, Inside A C# Mobile Application Project

For my c# mobile application developed with visual studio 2008, i am trying to use the FTP. FTP works fine from the real device, but it does not work when i use the device emulator: the connection is successful, but it failed when attenpting to retrieve data. Both use windows mobile 5.

Did some of you already had this problem ? When i googlised, it seems to be recurring but not yet solved.

Here is the log displayed by the ftp server.

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> Connected, sending welcome message...

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> 220-FileZilla Server version 0.9.31 beta

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> 220 FTP server

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> USER aa

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> 331 Password required for aa

(000001) 04/05/2009 09:51:00 - (not logged in) (127.0.0.1)> PASS **

(000001) 04/05/2009 09:51:00 - aa (127.0.0.1)> 230 Logged on

(000001) 04/05/2009 09:51:01 - aa (127.0.0.1)> SYST

(000001) 04/05/2009 09:51:01 - aa (127.0.0.1)> 215 UNIX emulated by FileZilla

(000001) 04/05/2009 09:51:01 - aa (127.0.0.1)> CWD /

(000001) 04/05/2009 09:51:04 - aa (127.0.0.1)> PASV

(000001) 04/05/2009 09:51:04 - aa (127.0.0.1)> 227 Entering Passive Mode (127,0,0,1,5,22)

(000001) 04/05/2009 09:51:41 - aa (127.0.0.1)> disconnected.

Ad

Answer

It's some time ago since i worked with this mobile stuff, so i have no real solution, but maybe some explanation.

As you can see the problem occurs right after entering the passive mode. As you can see the used ip address is 127.0.0.1 which is even be communicated for the passive mode (with the used ports). I think that the emulated network stack has here some problems to get this virtual connection to work (with localhost addresses). So maybe you should try not using the passive mode to get it to work.

Another way to get more into this problem would be recording the communication with WireShark and trying to examine what excactly goes wrong. But that would any work if you have any deeper knowledge about tcp ip and all this stuff.

Ad
source: stackoverflow.com
Ad