Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7592583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:56:34+00:00 2026-05-30T20:56:34+00:00

I have problem consuming a WCF REST service in my android application. The client

  • 0

I have problem consuming a WCF REST service in my android application.
The client keeps throwing UnknownHostException.

HttpClient httpclient = new DefaultHttpClient();
HttpGet request = new HttpGet("http://windows");
ResponseHandler<String> handler = new BasicResponseHandler();
String result = httpclient.execute(request, handler);

WCF service is hosted on IISExpress (http://windows:80) and it works localy in the browser as well as in remote box in same LAN (where I am developing ANDROID client).

Android permissions are OK in the manifest and I have tried HttpGet on google.com and it works OK.

Can some one please explain, why android cant open connection to (http://windows:80) thats hosted on remote computer in LAN over IISExpress, while the browser opens it (on both computers) with no problem?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:56:36+00:00Added an answer on May 30, 2026 at 8:56 pm

    If you’re on Windows, most likely your desktop can access http://windows because it has a default domain postfix / search scope which is returning the fully qualified domain name “windows.x.x”, where x.x = your internal domain. Alternatively it might be resolving the host using WINS.

    The android or android emulator likely doesn’t have the same DNS search scope / postfix, so you’d have to supply the FQDN (fully qualified domain name, i.e. windows.yourdomain.com).

    Use a DNS query tool like “nslookup” (windows) or “dig” / “host” (linux) to verify that the DNS server the android or android emulator is trying to use:

    Example for Windows

    Use “ipconfig /all” to find your DNS server and DNS domain postfix…

    c:\> ipconfig /all
    
    Windows IP Configuration
    
    Host Name . . . . . . . . . . . . : MYLAPTOP
    Primary Dns Suffix  . . . . . . . : mydomain.com <<<<
    Node Type . . . . . . . . . . . . : Hybrid
    IP Routing Enabled. . . . . . . . : No
    WINS Proxy Enabled. . . . . . . . : No
    DNS Suffix Search List. . . . . . : mydomain.com <<<<
    
    Ethernet adapter Local Area Connection:
    Connection-specific DNS Suffix  . : mydomain.com
    Description . . . . . . . . . . . : Intel(R) 82577LM Gigabit Network Connection
    Physical Address. . . . . . . . . : xx-xx-xx-xx-xx-xx
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    IPv4 Address. . . . . . . . . . . : 192.168.42.101 (Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Lease Obtained. . . . . . . . . . : Wednesday, February 29, 2012 9:28:23 AM
    Lease Expires . . . . . . . . . . : Thursday, March 08, 2012 9:28:22 AM   
    Default Gateway . . . . . . . . . : 192.168.42.1
    DHCP Server . . . . . . . . . . . : 192.168.42.5
    DNS Servers . . . . . . . . . . . : 192.168.42.6  <<<<
                                        192.168.42.7
    Primary WINS Server . . . . . . . : 192.168.42.6
    Secondary WINS Server . . . . . . : 192.168.42.7
    NetBIOS over Tcpip. . . . . . . . : Enabled ...
    

    From above, we can see that our DNS domain is “mydomain.com” and our primary DNS server is “192.168.42.6”. The DNS server should be able to resolve “windows.mydomain.com” (or whatever your domain is in this case).

    Verify your server can resolve the fully qualified hostname:

    c:\> nslookup windows.mydomain.com 192.168.42.6
    

    (replace 192.168.42.6 with your DNS server)

    You should get something like this (assuming in my case that windows registered with the DHCP and DNS server(s) as 192.168.42.106:

    C:\>nslookup windows.mydomain.com 192.168.42.6
    Server:   dns01.mydomain.com
    Address:  192.168.42.6
    Name:     windows.mydomain.com
    Address:  192.168.42.106
    

    If you get an invalid response like…

    *** dns01.mydomain.com can't find windows: Non-existent domain

    Then the host you’re looking for isn’t in the DNS domain that you supplied, so there might be a mismatch between default DNS domain and DHCP for your android / emulator.

    Alternatively you could just use the IP address directly, as mentioned above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am consuming a web service in .NET application with WCF client. The Endpoint's
I have a Silverlight 2 application that is consuming a WCF service. As such,
I am writing an application that is consuming an in-house WCF-based REST service and
I have a problem with consuming a third-party web service in .NET C#. It
I might have a problem with my application. There is a client running multiple
I have a WCF service that stores and processes images. Consuming applications can download
I have a WCF ASP.Net 4.0 web service we'll call WebService. WebService is consuming
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have a WCF restful service that I'm trying to upload an image to.
I use WCF for an ASP.Net MVC 2 Application. And when the service has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.