File Transfer example errors

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
 

derez

Expert
Licensed User
Longtime User
Such errors can be the result of many faults in the program.

Can you attach the code ?
 

nigelr

Member
Licensed User
Code attached

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

Attachments

  • FileTransfer.sbp
    3.5 KB · Views: 188

moster67

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

B4X:
client.Connect("192,26.39.4",50000)

I believe you should change the comma into a dot so it becomes:

B4X:
client.Connect("192.26.39.4",50000)

Good luck.
 

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:
 

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?
 

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.
 
Top