Re: Dns.GetHostEntry functionality

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Ok, I can buy into that. However, I work from home and my network resolves the name requests through my Windows Server 2008 system.

Just curious, in a network like your office network, where do the names get resolved?

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com> wrote in message news:Of25$SfhIHA.200@xxxxxxxxxxxxxxxxxxxxxxx
I'm no Vista expert. Try resolving www.microsoft.com. I'm pretty sure that will work.

Paul T.

"David" <david@xxxxxxxxxxx> wrote in message news:1E71F8D9-2C94-4BC8-87B5-C736DD25FEBF@xxxxxxxxxxxxxxxx
If I substitute 10.0.0.20 for david-1, everything works fine. That is, the functionality of my app works to connect to the PC and retrieve data and send data. So this tells me that I have connectivity to the network. It is just that DNS seems not work work. Does Vista not use netbios names? I am pretty sure that it does.

"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.GetHostEntry functionality
    ... I maually put in a DNS entry into the device network settings, even though OpenNetCF apis are reporting dns addresses. ... "Paul G. Tobey " <p space tobey no spam AT no instrument no spam DOT ... If you have two PC-type machines, open a MS-DOS window on one of them and try to view the network information for the one whose name you're currently trying to resolve, using the machine name. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Report this spam to: groups-abuse@google.com
    ... If the spammers derived $0 in spam related ... A slight understanding that usenet is pretty much ... Google groups is simply a node on the usenet network, ... 1581 ROM from early Commodore disk drives. ...
    (sci.electronics.misc)
  • Re: Checking Outbound Exchange Email
    ... The reason being is I have a client computer generating what possibly could be spam mail and I want to identify which computer is generating so many email messages. ... Next, what is the network topology, are you using one NIC or two in the SBS? ... My other usual recommendation is to enable logging on your Internet router, if it can do that, and to look for the feature in future purchases if it can't. ...
    (microsoft.public.windows.server.sbs)
  • RE: Your opinions on spyware, adware, spam, etc. and dealing with them
    ... Your opinions on spyware, adware, spam, etc. and dealing with them ... Would you want someone to hack / crack into your network and steal all or ...
    (Security-Basics)
  • RE: A question for the list...
    ... > The problem here is that spam cannot be looked at in the realms of network ... Other countries can introduce anti-spam laws that and can also then ... work with the EU and the US, in applying a legal response to a problem ...
    (Incidents)