Search code examples
androidweb-servicessocket-timeout-exception

My application works on android emulator but don't work in android device


I made a web service in .Net Framework 3.5 in Microsoft Visual Studio 2008 and called it from android. I used Sql Server as a database.

When I am running my application in the android emulator, it will run fine but if I install it onto my android device, then it will throw a java.socket.SocketTimeOutException.


Solution

  • I got the solution. Please take care that your computer Firewall is off when you use IIS as virtual server on your local pc. If you turn off your firewall protection then it will be allowed you to access the web methods but if firewall is on then you get java.net.SocketTimeOutException