ok I've got some good news for you ;)
I need a FTP client for the .Net CF, so I tried to use edtftp .net.
Here are the little modifications needed to run the client on .net cf:
FTPControlSocket - l109 : Console.out not supported !
- private TextWriter log = System.Console.Out;
+ private TextWriter log = new StreamWriter(@"\ftp.log",true, Encoding.Unicode);
EDIT: the Logout() Method of FTPControlSocket only Flush the TextWriter wich is not enough.
FTPControlSocket - l237 : due to StreamWriter, we need to explicit close the stream (>< Console.out)
log.Flush();
+ log.Close();
log = null;
I think this could be a bug in a general environnement. The abstract class TextWriter has to support the close() method. So Close() should be called at the logout. Assign the stream to null is not enough to free the file pointer.
FTPControlSocket - l421 : the local IP of the Pocket PC is rarely a valid IP that supports the resolve method -> direct use of the IP
- IPHostEntry remoteHostEntry = Dns.Resolve(ipAddress);
- IPEndPoint ipe = new IPEndPoint(remoteHostEntry.AddressList[0], port);
+ IPEndPoint ipe = new IPEndPoint(IPAddress.Parse(ipAddress), port);
the last problem is the BufferedStream:
2 solutions:
- Write one by yourself: it's only a stream with a buffer. and stream is supported in the .Net CF
- Use an existing one: for e.g pick up the BufferedStream.cs from Mono Project (look in class\corlib\System.IO\ ) If you use this one you'll need to remove the Localisation part and adapt the argument exception to only 1 argument.
if you need more infos, just ask
maybe the edtftp .net could be compact framework compatible:
I mean you only need a BufferedStream and add some
#if COMPACT_FRAMEWORK
....
#else
....
#endif
Have fun !
ps: i only tried a couple of transfers till now. so there still could be some errors