FTP

Last post 11-10-2008 7:04 by pfrelek. 55 replies.
Page 1 of 4 (56 items) 1 2 3 4 Next >
Sort Posts: Previous Next
  • 03-01-2005 4:17

    I am trying to develop FTP capability.

    In the Library for classes in OpenNETCF.Net namespace, it mentions FTP, FTPException, FTPFile and FTPFiles classes. However I can not find the source code for them.

    Has anybody used these. It would be great to see some sample code using these capabilities.

    Thanks
    highflyer
  • 03-01-2005 11:08 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 2,255

    Re: FTP

    The source for all of them is in the source Vault. I don't have a ready example, but it's a very simple interface.
  • 03-02-2005 2:45 In reply to

    Re: FTP

    Hi Ctacke,

    Many thanks for your help. How can I navigate to Source Vault. I do not think by Source Vault you mean navigating from Home page > Source page and then on to OpenNETCF.Net, because the FTP files are not included there.

    I must say OpenNETCF.org website is an excellent website and would do a lot to promote good programming for CF.


    Thanks again.
  • 03-02-2005 4:05 In reply to

    Re: FTP

    http://vault.netcf.tv/VaultService/VaultWeb/login.aspx

    User: guest
    Password: guest

    The old source pages on the website are no longer kept updated and eventually will be replaced with links to the vault.

    Peter
    Peter

    Peter Foot
    Windows Embedded MVP
    www.inthehand.com | www.opennetcf.org
  • 03-02-2005 4:16 In reply to

    Re: FTP

    Thank You.

    highflyer
  • 03-02-2005 6:27 In reply to

    Re: FTP

    I have just tried to use the FTP facility of the OpneNETCF.Net. However when I try to Build OpenNETCF.Net, I get an error.

    The type "EventWaitHandle" can not be found. This is located in FTP.cs.

    highflyer
  • 03-02-2005 15:13 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 2,255

    Re: FTP

    Yep, EventWaitHandle is over in the Threading stuff. You might be best off to get the Vault client from www.sourcegear.com and just pull the whole source tree down to ensure you've got all dependencies.
  • 03-04-2005 2:36 In reply to

    Re: FTP

    ctacke,

    Many thanks.
  • 03-05-2005 3:11 In reply to

    Re: FTP

    I have tried to use the FTP facility. One very small mistake I have noticed in the FTP.cs, in GetFile routine,

    (!File.exists(LocalName))

    must be changed to :

    (File.exists(LocalName))


    I have written a very basic code to download a file from the Server to the Device. My code is :


    FTP myFTP = new FTP();

    myFTP.Port=21;
    myFTP.RemoteHost="HostDirectory.net";

    myFTP.Connect("UserID","pwd");

    bool ServerConnected = false;
    myFTP.ConnectionTimeout=10000;

    while (!ServerConnected)
    {
    if (myFTP.IsConnected)
    {
    ServerConnected=true;
    }
    Thread.Sleep(1000);
    }

    if (ServerConnected)
    {
    myFTP.RemoteDirectory="\\SubDirectoryTemp";
    myFTP.TransferType= FTPTransferType.Binary;

    try
    {
    myFTP.GetFile("test.asp","AA.asp",true);
    myFTP.Disconnect();
    return "Success";
    }
    catch(Exception e)
    {
    myFTP.Disconnect();
    return "GetFile Failure : " + e.ToString(); }
    }
    else
    {
    return "Failure : Timed Out";
    }



    Out of every 50 times I run this code I may just get one successfull session.

    I must be doing something very wrong. Could you please advise me on this.

    One other thing to do with OpenNETCF.Net but not with FTP, is that I use the ConnectionManager to establish GPRS connection. I get a GPRS connection, however when I manually look at the state of the GPRS by touching the antena symbol with stylus, the state of GPRS says Connect GPRS, instead of saying connected. For some reason the system has not registered the state of GPRS after connecting with ConnectionManager. Do I need to somehow register the state of the GPRS after programmatically establishing one, similar to registering the GSM after turning it ON.


    Thank you
    highflyer
  • 03-14-2005 4:01 In reply to

    Re: FTP

    Has anybody tried the FTP facility. I have written a very simple code (abve), using the OpenNETCF FTP facility, however with not much success. Well it works occasionally, however I get more misses than hits.

    I appreciate it if any body has used it successfully to let me know. It would also be great help if you have used it successfully to let me know what I am doing wrong.

    Thanking you in advance,
    highflyer
  • 03-15-2005 22:00 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 2,255

    Re: FTP

    Have you tried over plain ethernet to rule out the GPRS connection? I've used this library many times without problem.
  • 03-17-2005 4:27 In reply to

    Re: FTP

    Hi ctacke,

    Many thanks for your response. It is good to know that you have used the routines without any problems. As you suggested I also tried the routine over the ethernet. Unfortunately with no success. The routine seems to be O.K. in both cases i.e. connecting via GPRS and ethernet when connecting to the Server (using .Connect). However when I use .GetFile I get the errors.

    When using ethernet the errors are mainly: System.IO.IOException and System.Net.Sockets.SocketException:No such host is known

    When using GPRS the errors are mainly : System.IO.IOException and OpenNETCF.Net.FTPException.

    I have been able to download the file 4 times using GPRS ( 4 out of 50 times). I have not been able to have one successfull session when using ethernet.


  • 04-29-2005 13:58 In reply to

    Re: FTP

    Where did you find the top-level FTP class? I have been able to find all the lower-level classes in the source vault, but not the top-level class that has the Port, RemoteHost, and Connect methods you mention.

    Thanks

    David Owen
  • 05-24-2005 10:37 In reply to

    Re: FTP

    I just downloaded the 1.3 version of the smart device framework. The FTP class referenced, does not seem to be in the class library. I see OpenNetCf{}.Net{}.FTP{}, but no FTP class definition...am I missing something?

    By the way, I'm a fairly new developer to Pocket PC/Smart devices, and using Visual Studio VB.Net, but really like this forum you guys have been invaluable in my application development
  • 05-24-2005 19:00 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 2,255

    Re: FTP

    You need to use things like the FtpRequestCreator and FtpWebRequest. Take a look at the FTP sample in Vault. The online help is incorrect listing hte FTP class - it was my original implementation. We've since refactored it to match the desktop FTP classes in the FF 2.0
Page 1 of 4 (56 items) 1 2 3 4 Next >