Unhandled Exception in TcpClient with Xamarin.Android Visual Studio 2010
i need help on socket programming for android device. I am a novice in
Xamarin.Android programming but not a novice in .NET programming. I want
to implement an application which communicates with remote server using
socket. I know i could do this using TCPClient in c# .NET, but when i try
to do this using TCPClient in Xamarin.Android, i got a runtime error, No
debug error, No build error, but i got an "Unhandled Exception" which
crashes my application at runtime.
Visual Studio and Xamarin.Android did not provide any detail about this
error, all i saw was "Unhandled Exception". I am connecting to a local
WAMP server running on my PC.
NOTE: If i do this using c# only (c# console app) without Xamarin.Android,
everything works fine, but when it gets to android project using c# with
xamarin, i got this error. I am confused and don't know what to do.
The line of code that gives the error is:
System.Net.Sockets.TcpClient cl = new
System.Net.Sockets.TcpClient("127.0.0.1", 80);
I am using visual studio 2010 with Xamarin.Android. Pls help.
Thanks in advance.
No comments:
Post a Comment