Connect to TCP Server within a WifiHotspot

Hi there,

I am new to Xamarin and I developed an Android App which connects to a TCP-Server running on my local computer. This works perfectly fine as long as both my android phone and my computer are connected to my router. Now I tried the same with my pc connected to my phone via the phone's Wifi-Hotspot and got an error when calling the Socket.Connect methode with the following output:

System.Net.Sockets.SocketException: Invalid arguments
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000bc] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/mcs/class/System/System.Net.Sockets/Socket.cs:1235

I am pretty sure the error is in my app and not due to some security settings of my computer because I can connect to the server from another pc also connected to the wifi-hotspot.
So what could be the problem? I can't imagine why the app works when connected to my router but not within the wifi-hotspot.

Thank you for your help.
Greetings Christian

Sign In or Register to comment.