Results 1 to 17 of 17

Thread: Transfer Files!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Transfer Files!

    hi guys how can i programatically do this task..

    1. Open a wifi connection on a device (connect to a default network, let say linksys)

    2. transfer xml file from mobile to PC (with default ip, ;et say 171.68.1.1)

    3. Closse the wifi connection after the transfer

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Transfer Files!

    Did we not cover this in your question last week?

    I pointed you at a network connection video that shows you how to connect to a network, and FTP to transfer the file, or 'roll your own' transfer

    Did that not do the job?
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Transfer Files!

    is there another way aside from what we have cover last week? im just looking for some alternatives..

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Transfer Files!

    As far as network connection is concerned - what was outlined is probably the best solution I have seen.

    You can use the connection manager (there is a managed wrapper here)

    For transferring, FTP, roll your own, map a drive, HTTP - all discussed last week
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Transfer Files!

    here is my sample code and i just cant make it work..

    Computer's IP is 192.168.1.118
    Device IP is 192.168.1.117

    Then i created a folder named Armada and Shared it to the network..

    Device to PC...

    vb Code:
    1. Dim remotePath As String = "\\192.168.1.118\Armada\" 'PC path
    2.         Dim localPath As String = "\Program Files\armada\armada.xml" 'Device Path
    3.  
    4.         If Directory.Exists(remotePath) = False Then
    5.             MsgBox("Remote Path not Found")
    6.             Exit Sub
    7.         End If
    8.  
    9.         Try
    10.             File.Copy(localPath, remotePath & "armada.xml")
    11.         Catch ex As Exception
    12.             MsgBox(ex.Message)
    13.         End Try

    PC to Device...
    vb Code:
    1. Dim remotePath As String = "\192.168.1.117\Program Files\" 'Device Path
    2.         Dim localPath As String = "C:\Jigsaw\eBUS\ARMADA_GATEWAY\eTASUpload\Resources\armada.xml" 'PC path
    3.  
    4.         If Directory.Exists(remotePath) = False Then
    5.             MsgBox("Remote Path not Found")
    6.             Exit Sub
    7.         End If
    8.  
    9.         Try
    10.             File.Copy(localPath, remotePath & "armada.xml")
    11.         Catch ex As Exception
    12.             MsgBox(ex.Message)
    13.         End Try

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Transfer Files!

    Hey,

    What happens when you run the above code? Do you get an exception? If so, what is it?

    Gary

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Transfer Files!

    it always display the message Remote Path not Found! it means it cant access the remoth path.. then i tried to remove this block of code and it just return IOexception as error message..

  8. #8
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Transfer Files!

    Hey,

    Have you correctly setup permissions on this remote share? Who has permission to access it?

    Gary

  9. #9
    Member
    Join Date
    Jan 2006
    Posts
    52

    Re: Transfer Files!

    Transfer files via HTTP and use this article. Follow it to the letter and you cannot go wrong. I am now successfully transferring files wirelessly to and from my mobile device after lots of (unsuccessful) pain with ftp

    http://msdn.microsoft.com/en-us/library/aa446517.aspx

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Transfer Files!

    i just shared the folder armada!..
    @nevh2001 via HHTP requires an internet connection right?

  11. #11
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Transfer Files!

    Quote Originally Posted by rothj0hn View Post
    i just shared the folder armada!..
    @nevh2001 via HHTP requires an internet connection right?
    A network connection - no necessarily an internet connection
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  12. #12
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Transfer Files!

    Quote Originally Posted by rothj0hn View Post
    i just shared the folder armada!..
    @nevh2001 via HHTP requires an internet connection right?
    Yes, you shared the folder, but what permissions did you set up for that share? Try giving the "Everyone" user full access to the share. If you can get that to work, then you can start restricting it back to a narrower group of people.

    Gary

  13. #13

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Transfer Files!

    my only concert about this process is there are too many things to configure, you need to setup the IIS. Unlike in a FTP transfer you dont have to do such things.

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Transfer Files!

    i tried HTTP transfer but i always got this error, "Unable to connect to the remote server"

  15. #15
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Transfer Files!

    Hey,

    Did you have problems implementing the article that you were linked to? Or were you able to follow it exactly?

    Gary

  16. #16

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Transfer Files!

    i just do it exactly what the articles says.. if i test it while the mobile is sync to my pc it works fine. but if i try it via wifi it fails.. i tried to ping it and it do response so it means that it was connected to the network.

  17. #17
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Transfer Files!

    Hi,
    I hate to keep repeating this, but the Jim Wilson video on network connection goes through all these problems and ensures you get a correct network connection.

    It could be a firewall issue too
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width