Skip to content Skip to sidebar Skip to footer

Connection Refused When Trying To Acces Local Webservice Using Android

I am creating a server built in Visual Basic 2010 and that program can insert/update/delete to a database that I use. I created a local Web Service that is used to synchronize the

Solution 1:

Try adding:

if (android.os.Build.VERSION.SDK_INT > 9) {
    StrictMode.ThreadPolicypolicy=newStrictMode.ThreadPolicy.Builder().permitAll().build();
    StrictMode.setThreadPolicy(policy);
}

Does this help?

Solution 2:

check your laptop ip and your device ip.

it should be in same sub net mask

The laptop and mobile(android) device ip must be 192.168.X.X

Solution 3:

finally its solved.. the problem is visual studio 2010 so complicated in setting the IIS, then i try to developt my web service on Visual studio 2008 and IIS work fine! the Android can access the web service without connection refused.

Solution 4:

Ran into this problem but the solution was rather something some would encounter by familiarity.

Make your the <uses-permission android:name="android.permission.INTERNET"/> is on your Manifest.

Post a Comment for "Connection Refused When Trying To Acces Local Webservice Using Android"