Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. File Transfer using C#

File Transfer using C#

Scheduled Pinned Locked Moved C#
questioncsharpxml
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Ian Uy
    wrote on last edited by
    #1

    Good Day, What is the best way to transfer files from C# to a Mobile phone? I need to transfer a small XML file. Thanks! :laugh:

    It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.

    L 1 Reply Last reply
    0
    • I Ian Uy

      Good Day, What is the best way to transfer files from C# to a Mobile phone? I need to transfer a small XML file. Thanks! :laugh:

      It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.

      L Offline
      L Offline
      Luke Lovegrove
      wrote on last edited by
      #2

      There are two ways of doing this, and I've done both in applications before. The easiest way is to use ActiveSync (XP and earlier) or Windows Mobile Device Centre (WMDC) for copy the file you with a folder that is synced with the device. The benefit of this method is you simply write to a regular file on the desktop system, and it doesn't matter if the mobile device is connected or not. Worst case, the file is synced across next time the device connects. The second way, which involves a little more work is to use RAPI.DLL (you still need ActiveSync or WMDC) installed to do this. The API in RAPI.DLL allows you to connect to a device through C# and copy information to and from the device. Your best bet here would be to look at the RAPI docs on MSDN, or look at a framework from OpenNETCF Consulting which from memory, is free.

      ------------------------ Luke Lovegrove ------------------------

      I 1 Reply Last reply
      0
      • L Luke Lovegrove

        There are two ways of doing this, and I've done both in applications before. The easiest way is to use ActiveSync (XP and earlier) or Windows Mobile Device Centre (WMDC) for copy the file you with a folder that is synced with the device. The benefit of this method is you simply write to a regular file on the desktop system, and it doesn't matter if the mobile device is connected or not. Worst case, the file is synced across next time the device connects. The second way, which involves a little more work is to use RAPI.DLL (you still need ActiveSync or WMDC) installed to do this. The API in RAPI.DLL allows you to connect to a device through C# and copy information to and from the device. Your best bet here would be to look at the RAPI docs on MSDN, or look at a framework from OpenNETCF Consulting which from memory, is free.

        ------------------------ Luke Lovegrove ------------------------

        I Offline
        I Offline
        Ian Uy
        wrote on last edited by
        #3

        Thanks for the reply, Luke. Sorry for not making things clear enough. What I would like to accomplish is not a PC <-> Mobile transfer, but a Server-Client architecture. SERVER <--> [WIRELESS ROUTER] <--> MOBILE CLIENTS So the Clients (MOBILE) will request for the XML file from the server, the server in turn will respond by sending the XML file from the requesting client. Please advice. I'm thinking of using web service for this and thought that others here may have a better solution. Thanks! :)

        It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.

        modified on Thursday, August 7, 2008 9:11 AM

        L 1 Reply Last reply
        0
        • I Ian Uy

          Thanks for the reply, Luke. Sorry for not making things clear enough. What I would like to accomplish is not a PC <-> Mobile transfer, but a Server-Client architecture. SERVER <--> [WIRELESS ROUTER] <--> MOBILE CLIENTS So the Clients (MOBILE) will request for the XML file from the server, the server in turn will respond by sending the XML file from the requesting client. Please advice. I'm thinking of using web service for this and thought that others here may have a better solution. Thanks! :)

          It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.

          modified on Thursday, August 7, 2008 9:11 AM

          L Offline
          L Offline
          Luke Lovegrove
          wrote on last edited by
          #4

          Yeah, I'd probably suggest a web service of sorts for that. Keeping it as simple as possible is always the best thing to do, especially with mobile devices. You could hit the server directly rather than through a web service if you were so inclined as well. I haven't used the Syetem.Net namespace much on desktops or mobile devices, but I suspect it would be a bit easier code wise to request it through a web service.

          ------------------------ Luke Lovegrove ------------------------

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups