Monday, March 26, 2012

System.Net.Dns.GetHostByAddress returns incorrec t Hostame

Hi!

I have a problem with

System.Net.Dns.GetHostByAddress(ls_Request.UserHos tAddress()).HostName

Usually the call GetHostByAddress returns the correct hostname of the
client, but sometimes I get a hostname like _CERDR1342B88E.
Why? The clients are running under Windows CE.NET 4.1...

SvenSven wrote:

> Hi!
> I have a problem with
> System.Net.Dns.GetHostByAddress(ls_Request.UserHos tAddress()).HostName
> Usually the call GetHostByAddress returns the correct hostname of the
> client, but sometimes I get a hostname like _CERDR1342B88E.
> Why? The clients are running under Windows CE.NET 4.1...
> Sven

What happens if you probe a ip address that returns such a name op port 445?
Is it open? If so, the computername is returned and not the hostname.

Someone with more knowledge of the tcp/ip system could clear this out.

//Rutger
You should post this to the
microsoft.public.dotnet.framework.compactframework group.

feroze
==============
this posting is provided as-is.

"Rutger Smit" <DoDotNet@.gmail.com> wrote in message
news:10jf0rcdh7os851@.corp.supernews.com...
> Sven wrote:
> > Hi!
> > I have a problem with
> > System.Net.Dns.GetHostByAddress(ls_Request.UserHos tAddress()).HostName
> > Usually the call GetHostByAddress returns the correct hostname of the
> > client, but sometimes I get a hostname like _CERDR1342B88E.
> > Why? The clients are running under Windows CE.NET 4.1...
> > Sven
> What happens if you probe a ip address that returns such a name op port
445?
> Is it open? If so, the computername is returned and not the hostname.
> Someone with more knowledge of the tcp/ip system could clear this out.
> //Rutger
Well, the call System.Net.Dns.GetHostByAddress is executed on a
Windows 2003 Server... and i want to get the hostname of an IP address
(from a Windows CE system). I don't know if the behaviour is specific
to CE...

"Feroze [msft]" <ferozed@.online.microsoft.com> wrote in message news:<413795eb$1@.news.microsoft.com>...
> You should post this to the
> microsoft.public.dotnet.framework.compactframework group.
> feroze
> ==============
> this posting is provided as-is.
Rutger Smit <DoDotNet@.gmail.com> wrote in message news:<10jf0rcdh7os851@.corp.supernews.com>...
> Sven wrote:
> > Hi!
> > I have a problem with
> > System.Net.Dns.GetHostByAddress(ls_Request.UserHos tAddress()).HostName
> > Usually the call GetHostByAddress returns the correct hostname of the
> > client, but sometimes I get a hostname like _CERDR1342B88E.
> > Why? The clients are running under Windows CE.NET 4.1...
> > Sven
> What happens if you probe a ip address that returns such a name op port 445?
> Is it open? If so, the computername is returned and not the hostname.
> Someone with more knowledge of the tcp/ip system could clear this out.
> //Rutger

I looked up the computername on the windows ce machines, but the
computername is the one we set initialy (not _CERDR1342B88E)! But the
call System.Net.Dns.GetHostByAddress returns _CERDR1342B88E. I don't
know what the call System.Net.Dns.GetHostByAddress exactly does, but
it does not seem to be right.

Since the hostname is not really _CERDR1342B88E, i think a probe on
port 445 does not make sense...

Sven
Sven wrote:

> Rutger Smit <DoDotNet@.gmail.com> wrote in message news:<10jf0rcdh7os851@.corp.supernews.com>...
>
> I looked up the computername on the windows ce machines, but the
> computername is the one we set initialy (not _CERDR1342B88E)! But the
> call System.Net.Dns.GetHostByAddress returns _CERDR1342B88E. I don't
> know what the call System.Net.Dns.GetHostByAddress exactly does, but
> it does not seem to be right.
> Since the hostname is not really _CERDR1342B88E, i think a probe on
> port 445 does not make sense...
> Sven

It looks like GetHostByAddress does NOT always do a reverse lookup. Ik
don't know what is doe. Try to analyze the network logs that can be
caputred using Ethereal.

The port 445 suggestion was becaus of the computername, but it doens't
have anything to do with it.

//Rutger

0 comments:

Post a Comment