如果你使用Windows,很可能你的桌面可以訪問http://windows,因爲它有一個默認的域後綴/搜索範圍,它返回完全限定的域名「windows.x.x」,其中x.x是你的內部域。或者,它可能是使用WINS解析主機。
android或android模擬器可能沒有相同的DNS搜索範圍/後綴,因此您必須提供FQDN(完全限定的域名,即windows.yourdomain.com)。
使用像「NSLOOKUP」(Windows)或「挖」 /「主機」(Linux)的DNS查詢工具驗證DNS服務器的Android或Android模擬器嘗試使用:
示例視窗
使用「IPCONFIG/ALL」找到你的DNS服務器和DNS域名後綴...
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 ...
從上面,我們可以看到,我們的DNS域名是「mydomain.com」和我們的主要DNS服務器是「192.168.42.6」。 DNS服務器應該能夠解析「windows.mydomain.com」(或者這個例子中的任何域名)。
驗證您的服務器可以解析完全合格的主機名:
c:\> nslookup windows.mydomain.com 192.168.42.6
(與你的DNS服務器代替192.168.42.6)
你應該得到這樣的事情(在我的情況下,假設窗戶,註冊在DHCP和DNS服務器(S)爲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
如果你得到一個無效的響應像...
*** dns01.mydomain.com can't find windows: Non-existent domain
然後你要找的主機是不是在您提供的DNS域,所以有可能是默認的DNS域和DHCP之間的不匹配將Android /仿真器。
或者,您可以直接使用IP地址,如上所述。
您是否嘗試過使用服務器的直接IP而不是計算機名稱? – denolk 2012-02-20 11:28:04
那不是一個完整的URL,它沒有機器的IP地址。 – jeet 2012-02-20 11:29:42
請檢查TeddyBearFr's anwsers的評論 – no9 2012-02-20 11:43:14