none
Secure upload files to ftp server RRS feed

  • Question

  •  

    Hello,

     

    I'am searching for a secure way to upload xml files from a pocket pc to an ftp server? Does anyone has some sample code or any idea to do this. I find a lot of solutions for desktop but it should run on pocket pc. Opennetcf.net.ftp? Where can I get the dll if I download the sdf this one isn't present some other solutions?

     

    Thanks

    Wednesday, December 5, 2007 8:19 PM

Answers

  • Hi.

    There is a protocol called Secure FTP (SFTP). But unfortunatelly I don't know any libary for the .NET CF supporting this.

    Another possibility would be to encrypt your XML file by synchronous, asynchronous algorithms or certificates. S hort search on the Net shall give you tons of examples, even for the .Net Compact Framework.

     

    Regarding OpenNETCF.NET.FTP - take a deeper look at the SmartDeviceFramework. It is included within there for sure.

     

    Cheers, Peter

    Wednesday, December 5, 2007 8:32 PM

All replies

  • Hi.

    There is a protocol called Secure FTP (SFTP). But unfortunatelly I don't know any libary for the .NET CF supporting this.

    Another possibility would be to encrypt your XML file by synchronous, asynchronous algorithms or certificates. S hort search on the Net shall give you tons of examples, even for the .Net Compact Framework.

     

    Regarding OpenNETCF.NET.FTP - take a deeper look at the SmartDeviceFramework. It is included within there for sure.

     

    Cheers, Peter

    Wednesday, December 5, 2007 8:32 PM
  • You can use the following example. It uses the Ultimate SFTP library for .NET CF :

    // Create a new instance.
    Sftp client = new Sftp();
    // Connect to the SFTP server.
    client.Connect( "localhost" );
    // Authenticate.
    client.Authenticate( "test" , "test" );
    // ...
    // Upload all files and subdirectories from local folder 'c:\temp' to the remote dir '/temp'
    client.UploadFiles( "c:\\temp" , "/temp" );
    // Upload all directories, subdirectories, and files that match the specified search pattern from local folder 'c:\myfolder2' to remote folder '/myfolder2'.
    client.UploadFiles( "c:\\myfolder2" , "/myfolder2" , "*.cs" );
    // or you can simply put wildcard masks in the source path, our component will automatically parse it.
    // upload all *.css files from local folder 'c:\myfolder2' to remote folder '/myfolder2'.
    client.UploadFiles( "c:\\myfolder2\\*.css" , "/myfolder2" );
    // Upload *.cs and *.vb files from local folder 'c:\myfolder2' to remote folder '/myfolder2'.
    client.UploadFiles( "c:\\myfolder2\\*.cs;*.vb" , "/myfolder2" );
    // ...
    // Disconnect.
    client.Disconnect();
    Friday, December 31, 2010 11:45 PM