连接http问题

============问题描述============


String ServerUrl = "http://192.168.1.91/Service1.asmx?op=Log";
URL url = new URL (ServerUrl);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
如上代码,我连接webservice时候连不上,con连接显示false,求帮助

============解决方案1============


con会显示false吗?try/catch一下,你能直接访问http://192.168.1.91/Service1.asmx?op=Log这个地址吗

============解决方案2============


你用手机浏览器看能访问么?
在一个,这个地址是内网的地址,手机用移动的网络肯定是连不上的。
posted @ 2014-10-20 21:34  android开发教程2015  阅读(99)  评论(0编辑  收藏  举报
我要啦免费统计