Mobile Apps - FTP allows 47 files transfer but after that fails completely

Asked By @maram
12-Nov-09 10:18 AM
Hi all,

I have an FTP client developed in .NET 2.0 (SP1) C# app. Files are
transferred correctly for the first 47 times. After that, it just
fails and that is it. I am using the passive mode. The range of ports
for PASV mode on the FTP server is 1050 to 3500. And all ports are
open on the server machine. Firewall is also alrite. I am saying all
this because when the FTP transfer starts to fail, I shutdown and
restart the emulator (windows mobile 6.0) and the transfer again
succeeds before failing at around 50 times.

After debugging, I found that I can login at the FTP server and issue
the PASV command and get the port at which I need to connect to the
FTP server to transfer files. But when I am trying to open the data
connection, it fails saying the "server has actively refused
connection". We can think that the emulator cannot connect to the FTP
server on that port, but then why does the transfer work OK when the
emulator is restarted?

I have searched a lot on this topic but without vain.
FYI: I am transferring the files NON-STOP (one after the other) in a
Thread in my .NET app.

Thanking you all for your time,

Best regards,
-A
OpenNETCF
(1)
Outlook
(1)
Directory.GetFiles
(1)
FtpClient.Dispose
(1)
UploadFileNameToMove
(1)
Thread.Sleep
(1)
FilesForUpload.Length
(1)
UploadFileToServer
(1)
  Trevor replied to @maram
16-Nov-09 05:16 PM
Which FTP implementation are you using?  Can you post some code in the loop
used to send the files?  It sounds like there is a memory/resource leak in
the FTP implementation or in your code.
  @maram replied to Trevor
17-Nov-09 11:16 AM
Hi Trevor,

Thanks for your response.

You've got a point. However, the FTP client (on the help) uses two
sockets: one to send FTP commands and the second one is for data
connection (sending or receiving files). How do we explain the fact
that I am able to login at the FTP server and send the PASV command, I
get the result and back and I calculate the port on which to connect
to the FRP server. When I perform the connect on the data connection
socket, then it does not work.

I am using Google group on the web. How do I upload my codes?

Thanks in advance,

Best regards,
-A

loop
in
  Trevor replied to @maram
17-Nov-09 03:01 PM
You can just copy/paste the code or use a Usenet client (Outlook
Express/Windows Live Mail) and connect to
microsoft.public.pocketpc.developer using the Microsoft mail server and
attach the file.  Are you writing your own FTP client from scratch?  There
are some .NET FTP clients from OpenNETCF and the native WinInet FTP API can
be called from C# using PInvoke (see FtpOpen, FtpPutFile, etc. on MSDN).  I
believe the OpenNETCF implementation is just a wrapper around WinInet to
make it work the same as the desktop .NET API.
  Trevor replied to A
19-Nov-09 11:45 AM
Does FtpClient have a FtpClient.Dispose method?  If so, that should be
called to free the resources used by the FtpClient.  I would recommend
creating a single FtpClient object outside of your loop and passing it into
your uploadFileToServer function so it can be re-used.  Try something like
this:

/********************************************/
This is my UploadThread
private void UploadFiles()
{
String uploadFileNameToMove = null;
String[] filesForUpload = null;

while (isUploadOn)
{
filesForUpload = Directory.GetFiles (UPLOAD_DIR);

if (filesForUpload == null || filesForUpload.Length == 0)
Create New Account
help
Unable Sync notes associated with Outlook Calendar, Outlook Contac Mobile Apps ActiveSync 4.2 or 4.5 does not sync Outlook Notes, or any notes associated with Outlook Calendar, Outlook Contacts, or Outlook Tasks from PC to Smartphones. However, it does sync notes associated with Outlook Calendar Outlook Contacts, or Outlook Tasks from Smartphones to PC (while losing all formatting) - can anyone help
OpenNETCF 1.4 assemblies Mobile Apps Hi all! Please help to find assemblies for OpenNETCF 1.4 - OpenNETCF.Windows.Forms - OpenNETCF.Drawing - OpenNETCF I can not install the Smart Device Framework 1.4 because of VS2005. Thank you in advance PocketPC Developer Discussions OpenNETCF (1) SmartDeviceFramework (1) C_xyTopa (1) MarcTheir (1) AdvanceRe (1) SDF (1) MVP (1) VS (1 You can still find the source here: http: / / www.opennetcf.org / download.asp?product = SmartDeviceFramework14 Marc Their were problems with the OpenNETCF 1.4 installer. Either download the source as sugested by a previous poster or download
Error: Syncronization cannot be completed because Microsoft Outlook cannot open the Task folder Mobile Apps Outlook 2007, WMDC 6.1, Axim x50v running WM2003 SE Error: "Synchronization cannot be completed because Microsoft Outlook cannot open the Task folder. Close Outlook. Restart Outlook. With Outlook running, disconnect mobile device and reconnet. If the problem persists, reinstall Outlook." I tried this and it doesn't work. Notes and Files sync fine, so I know the connection is working. It's the Outlook 2007 Contacts, Calendar, and Tasks that don't work. Weirdly, Outlook Notes *do* sync. Everything
Pocket Outlookmostly they are the same in content, pocket outlook and Mobile Apps Pocket Outlookmostly they are the same in content, pocket outlook and pc outlook. you should give it a try. nonMVP, huangyz I'm a user of Outlook on the desktop both at home and at work, and I want to use it doing to better manage my time. I'm considering getting a PocketPC specifically for Pocket Outlook so I can sync the two together. What are peoples experiences of using Pocket Outlook with desktop Outlook. In my experience of using PIM software I've often found that a lot of client is not support on the mobile client. I'm sort of hoping that Pocket Outlook / Outlook 2003 will be able to contain the same information. Mark PocketPC Discussions Outlook (1