Link to home
Start Free TrialLog in
Avatar of deshaw
deshawFlag for India

asked on

Why GetHostEntry behaviour is different

Hello,

Could anyone please  take up this task. It is very important for us. Now I am having only one question. Why

Console.WriteLine("The FQDN host name is : " + Dns.GetHostEntry(string.Empty).HostName); prints just host name. Actually it prints "hostname.site.domain.com" in FQDN format but we have some hosts where it gives only "hostname" and that causing the problem.

Is it related to TCP IP parameters in registry??

Thanks.
Avatar of deshaw
deshaw
Flag of India image

ASKER

Hello,

We have solved this issue by removing  server name from hosts file. We show that in hosts file we have given hostname like "hostname IP" and not given topdomain name. This was a citrix server. Could  any one not tell what is the relationship between hosts file and GetHostEntry function?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of deshaw

ASKER

Thanks