Connection refused when trying to acces local webservice using Android

后端 未结 4 898
庸人自扰
庸人自扰 2021-01-17 03:44

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 synchroni

相关标签:
4条回答
  • 2021-01-17 04:32

    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

    0 讨论(0)
  • 2021-01-17 04:38

    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.

    0 讨论(0)
  • 2021-01-17 04:46

    Try adding:

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

    Does this help?

    0 讨论(0)
  • 2021-01-17 04:46

    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.

    0 讨论(0)
提交回复
热议问题