Re: Dns.GetHostEntry functionality



OK, you have a single PC at home? The Windows Server system? Or that
machine is remote? 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. For
example,

net view \\david-1

If this works, that indicates to me that you have name resolution. That
would point to a possible problem with the resolution capabilities on the
device. If it does not work, that points to your name resolution system (PC
problem).

If the former is the case and the device is indicated as the problem source,
try renaming the machine whose name you are trying to resolve from "david-1"
to something without that nasty - character like "david1". Does that work?

Paul T.

"David" <david@xxxxxxxxxxx> wrote in message
news:01C7F6B3-14A7-446D-9DE2-0C52FF5612DD@xxxxxxxxxxxxxxxx
You are correct. www.microsoft.conm resolved fine. Now I really need to
know how to resolve a computer name. I hope that someone can answer this.


"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
    ... Paul T. ... with Windows CE itself, but the component set chosen to base Windows ... shares on david-1. ... that indicates to me that you have name resolution. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Dns.GetHostEntry functionality
    ... I wanted to verify name resolution of the david-1 name. ... Windows CE does not know about, participate in, or resolve anything with ... Paul T. ... that indicates to me that you have name resolution. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Vista media center, ATSC HDTV, and 853x480
    ... Also a 720p program would look blurrier on your 24" monitor firsrt since it is bigger and more importanly since it is being upscaled to the higher resolution whereas on your 19" monitor very little scaling if any is being performed. ... to a Windows Vista computer and the 24" connected to a Windows XP computer. ... Play recorded TV from HD channels in Windows Vista MC on 19" monitor. ... The show video image can be scaled to whatever the WMP window is sized to. ...
    (microsoft.public.windows.mediacenter)
  • Re: Intercept windows messager on WindowsCE
    ... key pressed, tap, opening of new window, closing of windows, and ... Paul G. Tobey ha scritto: ... This has to do with how Unicode/ANSI declarations are ... You can either #define SetWindowsHookEx SetWindowsHookExW or change ...
    (microsoft.public.windowsce.app.development)
  • Re: Can only see 1/2 of BIOS screen
    ... resolution at 60 HZ refresh rate. ... whatever is set when windows is running. ... Most newer monitors will remember settings for various ... and safemode screens that are shifted to the left leaving a wide black ...
    (microsoft.public.windowsxp.general)