开发者

Android emulator not connecting to .Net web service

I am facing a problem in connecting my Android code to a .NET web service i.e I am n开发者_运维知识库ot able to call the web service from within the emulator. My web service is a simple HelloWorld web service that comes by default when u select web service project is VS2008. It is named Service1.asmx

Android code link :[http://pastebin.com/AGEZSKue]

can anyone give me a solution to my problem ?


This is what you should add to your Manifest.xml file

<user-permission android:name="android.permission.INTERNET"></user-permission>
<user-permission android:name="android.permission.ACCESS_NETWORK_STATE"></user-permission>


What error are you seeing reported?

This might just be due to network limitations - either with the cassini development web server or with iis express.

Check out this question and answer - Android Emulator loopback to IIS Express does not work, but does work with Cassini


Try to insert the Permissions NOT in the XML File, try to insert it via the Permission Tab in the ecplise view. Helped in my case.


You need a REST Service (check WCF Rest) to connect with Android. There are third party libs available for consuming SOAP Web Service

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜