c# - Having trouble connecting to wcf service on localhost from Android emulator -


i'm building app xamarin studio that's supposed access wcf service. accessing service works fine browser following url: http://localhost:52277/api

whenever try access android code, following exception:

system.net.webexception: error: connectfailure (connection refused) ---> system.exception: connection refused   @ system.net.sockets.socket.connect (system.net.endpoint remoteep) [0x00000] in <filename unknown>:0   @ system.net.webconnection.connect (system.net.httpwebrequest request) [0x00000] in <filename unknown>:0   --- end of inner exception stack trace ---   @ system.net.httpwebrequest.endgetresponse (iasyncresult asyncresult) [0x00000] in <filename unknown>:0   @ system.net.httpwebrequest.getresponse () [0x00000] in <filename unknown>:0   @ servicestack.serviceclient.web.serviceclientbase.send[string] (system.string httpmethod, system.string relativeorabsoluteurl, system.object request) [0x00051] in c:\users\nicklas.winger\documents\github\servicestack\src\servicestack.common\serviceclient.web\serviceclientbase.cs:896 

i'm running service on iis express, , i've modfied iis applicationhost.config (removing 'localhost' bindinginformation, according course on pluralsight):

<site name="proteintrackermvc" id="45">     <application path="/" applicationpool="clr4integratedapppool">         <virtualdirectory path="/" physicalpath="c:\users\nicklas.winger\documents\visual studio 2012\projects\proteintrackermvc\proteintrackermvc" />     </application>     <bindings>         <binding protocol="http" bindinginformation="*:52277:" />     </bindings> </site> 

also, web service building , deploying using iis express @ mentioned port. suggestions might doing wrong? :)

solved using following ip: 10.0.2.2 instead of localhost.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -