Skip to content Skip to sidebar Skip to footer

C#/java - Consuming Wcf Service From Android Emulator

I'm trying to learn how Android interacts with WCF (C#) service. I have gone through a lot of posts regarding the same, here at SO. However, I couldn't find a definite answer to th

Solution 1:

Try accessing

http://localhost:32444/Service1.svc/GetMessage 

from browser and check whether it is working.

Solution 2:

try to grub wsdl information and build client across generated classes. find tools like "svcutils" for java. Addditional you can make an error with connection setting and authentification.

Solution 3:

instead of localhost you should use 10.0.2.2 . Because localhost is not your computer. It is your android emulator. And if you still can't connect, try to edit your iis config.

in your user Documents > IISExpress > applicationhost.config edit your wcf service projects binding information. it is something like this : bindingInformation=":21422:localhost" and you should delete localhost and should be something like this : bindingInformation=":21422:"

to be clear your connection address is http:// 10.0.2.2:port/svcfile/...

I hope it works

edit: you have to run visual studio with administrator privileges (Run as administrator)

Post a Comment for "C#/java - Consuming Wcf Service From Android Emulator"