Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
DNS.GetHostName does not show updated DNS entry of local machine
Post Body

DNS.GetHostName (or similar) returns the incorrect DNS name of the localcomputer - if the hostname is different from the DNS name.

For example:

Current computername in Widows - WIN-12345

Updated computername in DNS - ABC-XYZ.mydomain.com

This is the only DNS entry for the device.

I want to query DNS to return the latter of the two above, running ON the device in question (192.168.1.1):

Console.Writeline(DNS.GetHostName(IPAddress.Parse("192.168.1.1")));

WIN-12345

If I query that same computer from a remote device with the code, I am returned the correct DNS name:

ABC-XYZ.mydomain.com

So, when run locally, not only does it not return the FQDN, but it also returns the incorrect name that DNS holds.

I have had to revert a process running NSLOOKUP to return the correct information.

Any ideas how to query DNS correctly in this situation using native code?

Author
Account Strength
80%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
285
Link Karma
30
Comment Karma
255
Profile updated: 4 days ago
Posts updated: 2 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago