Network connections only work if the device is connected via cable

Ok, Iโ€™ve tried the last couple of hours and I give up: Iโ€™m developing for a mobile device (Win CE on Unitech HT660) and has a strange thing: I try to communicate with the service on my PC and I use TCPClient for it.

This works fine, except for one big problem: As soon as I disconnect the USB cable that I use to copy files from VS during program startup, TCPClient throws a SocketException that the socket connection could not be completed because the target machine is active refused it (not in case the firewall is turned off and the service is listening)

And it becomes weirder: if the cable is connected, and I delete it after the program has made the connection, everything works fine, I can send and receive data without a cable, I just canโ€™t connect without a cable.

Btw: This is the same story with MySQLConnection from the MySQL.NET Connector. It works with the cable, but if it is removed without an established connection, the connection cannot be made.

Any ideas on this?

Thanks in advance!

PS: One thing I forgot to mention: I use wireless to connect to my network, and IE, as well as checking the computer using the service and mysql database, works on it.

+8
c # mysql windows-ce compact-framework tcp
source share
2 answers

If you are using Vista / Win7, check if the wireless network is set up as a private / office network. By installing it on a public network, you get very strange symmetries.

+1
source share

Thanks for all the helpful tips, but in the end it doesn't mean anything with my code or network or server. I tested it on another mobile device without any changes and it works.

It appears that the Unitech HT660 has some problems with TCP / IP connections under .Net. This is googled, and I'm not the only one with this problem ...

0
source share

All Articles