System.Net.Dns.GetHostByAddress returns incorrec t Hostame

S

Sven

Hi!

I have a problem with

System.Net.Dns.GetHostByAddress(ls_Request.UserHostAddress()).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
 
R

Rutger Smit

Sven said:
Hi!

I have a problem with

System.Net.Dns.GetHostByAddress(ls_Request.UserHostAddress()).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
 
F

Feroze [msft]

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

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

Sven

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...
 
S

Sven

Rutger Smit said:
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
 
R

Rutger Smit

Sven said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top