Re: Dns.GetHostEntry functionality

Tech-Archive recommends: Fix windows errors by optimizing your registry



It could be used to resolve your local names, but only if those names are
stored on some local or corporate DNS server. Generally, that's not the
case in an office environment. For example, here, in my office, you can be
100% sure that DNS is not resolving the name of my machine, "FARSIDE". I've
watched the packets...

Paul T.

"David" <david@xxxxxxxxxxx> wrote in message
news:1972FECB-4AC5-47C9-B57F-C3AD926EAADA@xxxxxxxxxxxxxxxx
DNS is absolutely used to resolve computer names. It is also used to
resolve names on the internet too.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:e7g0u9ehIHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
DNS isn't being used to resolve some local name. DNS is what is used to
resolve things like www.microsoft.com. There's no local service that
knows about your PC's NetBIOS name. I'm not 100% sure that NetBIOS names
like that *should* be resolved on WM5 devices. Unfortunately, I also
can't check it right now on mine. Maybe someone else knows...

Paul T.

"David" <david@xxxxxxxxxxx> wrote in message
news:5640D4EC-8A68-4111-98F0-8CE9C665DDBC@xxxxxxxxxxxxxxxx
HP 2790
Windows Mobile 5.0
HP iPAQ Wi-Fi Adapter

I have OpenNetCF installed on the device and I have used it to build
some code to go through the network configuration. It shows that I have
the correct DNS entries.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:uhopxtehIHA.6136@xxxxxxxxxxxxxxxxxxxxxxx
The only thing that I can think of is that the name you're asking for
is wrong (isn't the real device name), or that there's a bug in
resolution for NetBIOS names with - characters in them. What sort of
device are we talking about (it's not Windows Mobile, for example?)?
Version of CE? Networking components built in?

Your code works fine on my device.

Paul T.

"David" <david@xxxxxxxxxxx> wrote in message
news:B3DAB770-2D94-4BE6-8899-B0C51B61F484@xxxxxxxxxxxxxxxx
I have this code:

try
{
IPAddress[] addresses =
Dns.GetHostEntry("david-1").AddressList;
foreach (IPAddress address in addresses)
{
if (address.AddressFamily ==
AddressFamily.InterNetwork)
{
m_strServeIP = address.ToString();
break;
}
}
}
catch (SocketException ex)
{
MessageBox.Show(ex.Message);
Close();
return;
}

A SocketException is thrown "No such host is known".

Yet, I know I have connectivity since I can browse the internet and I
have a valid ip address and it can be pinged from the david-1
computer. My DHCP server is giving out dns and gateway information.
Why does the GetHostEntry fail?










.



Relevant Pages

  • Re: DNS query basics
    ... netBIOS disabled ... I suppose in my scenario DNS should be used to resolve names. ... if i ping xp by name with a trailing dot - it responds. ... it will use DirectSMB to resolve it. ...
    (microsoft.public.windows.server.dns)
  • Re: DNS-NetBios name resolution order
    ... it could help with slow access to shares but that depends on whether there is another problem other that the default name resolution ... You could setup a zone on your local DNS server, add A records for the local hosts and then use this DNS server on home LAN. ... You can add forwarders to the DNS server so the clients can resolve names out on the internet. ... >> of XP will attempt to resolve this name using Netbios. ...
    (microsoft.public.windows.server.networking)
  • Re: Verify how a name is resolved
    ... > our network runs both DNS and WINS, and many clients have a HOSTS ... Or can WINS resolve it? ... Win2000 and newer machines uses the DNS process FIRST. ... does not get resolved using the DNS process, then it uses theh NetBIOS ...
    (microsoft.public.win2000.dns)
  • Re: troubleshooting DNS when joining a computer to the domain
    ... then the name was probably resolved through WINS or a NetBIOS broadcast. ... find the DC's IP address in DNS. ... Don't just check that this client has a preferred DNS server IP ... issues with joining the domain if your workstation can't resolve the Active ...
    (microsoft.public.cert.exam.mcsa)
  • Re: Drive Mapping Issues in Win2K AD, DNS related?
    ... We have tried connecting via NetBIOS name and ... DNS appears to resolve the host names ... If the clients are W2k or newer, then is DNS resolving and do the SRV ...
    (microsoft.public.win2000.active_directory)