File Transfer example errors

Discussion in 'Questions (Windows Mobile)' started by nigelr, Aug 18, 2009.

  1. nigelr

    nigelr Member Licensed User

    Hi,
    Just tried to run the sample server/client file transfer code I had off the website and I'm getting some errors as below. Am I missing something simple .. I've only just start experimenting with this?

    1. When running uncompiled on the desktop, I get an immediate error on the server.start statement "Only one usage of each socket address (protocol/network address/port) is normally permitted"

    2. When running compiled on wm6 device, I get "An error occured on sub main_app_start. An error message cannot be displayed because an optional resource assembly containing it cannot be found" I assume this is the same thing.

    Any help appreciated. Thanks
     
  2. derez

    derez Expert Licensed User

    Such errors can be the result of many faults in the program.

    Can you attach the code ?
     
  3. nigelr

    nigelr Member Licensed User

    Code attached

    Hi,
    Code attached - I basically downloaded the file-transfer example and entered a different host name.
    Thanks.
     

    Attached Files:

  4. moster67

    moster67 Expert Licensed User

    By having a quick look at your code, one thing struck me immediately, namely on line 13:

    Code:
    client.Connect("192,26.39.4",50000)
    I believe you should change the comma into a dot so it becomes:

    Code:
    client.Connect("192.26.39.4",50000)
    Good luck.
     
  5. nigelr

    nigelr Member Licensed User

    Thought I was there

    Well spotted.. a real DOH moment! Unfortunately it didn't make any difference to the error I'm getting :confused:
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Did you try to change the port to a different one (other than 50000)?
    Maybe it is already used by another application.
     
  7. nigelr

    nigelr Member Licensed User

    Different Port

    Hi,
    Thanks ..I tried a different port number which solved the initial error but now I get an error when I press the 'Send File' button as shown in attached screen shot. Does this example work as-is on other systems?
     
  8. agraham

    agraham Expert Licensed User

    The message on Form1 in the background implies that no client has connected so there is nothing to send the file to.
     
  9. nigelr

    nigelr Member Licensed User

    Eureka!

    Ah! Apologies. Now that I understand it, it works perfectly.
    :sign0161:

    I've recently wasted 2 weeks trying to get Mobiforms to do anything reliably and it's made my first assumption to always be 'it doesn't work'.

    My faith is now fully restored. Wish I'd bought Basic4PPC weeks ago !

    Many thanks.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice