Quantcast

wcf service call in monodroid application giving error

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wcf service call in monodroid application giving error

anant
I'm having difficulties with accessing a WCF service. My service is running in the same solution as the MonoDroid App and is hosted by visual studio. I configured it as BasicHttp. The reference adds ok but at runtime when I call the one simple test method, I get: System.Net.WebException: Error: ConnectFailure (Connection refused). I'm calling the service on localhost:51559. Could this be a similar issue to cross domain web service querying with JQuery? Is the request seen as coming from localhost (the emulator) as well? AsI found that on calling my wcf service to web application are working fine but on monodroid application same wcf service giving error System.Net.WebException: Error: ConnectFailure (Connection refused) Thanks to anyone who takes interest in this.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wcf service call in monodroid application giving error

Spencer
Try 10.0.2.2 instead of localhost.  
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wcf service call in monodroid application giving error

anant
where to put 10.0.2.2 instead localhost in WCF service or monodroid application
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wcf service call in monodroid application giving error

anant
In reply to this post by Spencer
thank u very much ,its working now........... cheers......

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wcf service call in monodroid application giving error

anant
hi
Now its giving me this problem on connecting to sql server

{System.Net.WebException: The request timed out
  at

System.Net.HttpWebRequest.GetRequestStream () [0x00000] in <filename unknown>:0
  at

System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String

method_name, System.Object[] parameters) [0x00000] in <filename unknown>:0 }

please help me for this
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wcf service call in monodroid application giving error

anant
it means if i access simple wcf service it is work fine on using 10.0.2.2 instead localhost but when i put dB code for insertion on my sql server table in wcf service and invoking it on monodroid application is giving error of the request time out.details:-

{System.Net.WebException: The request timed out
  at

System.Net.HttpWebRequest.GetRequestStream () [0x00000] in <filename unknown>:0
  at

System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String

method_name, System.Object[] parameters) [0x00000] in <filename unknown>:0 }

Please help me again
Loading...