1

I use this code:

string Address = "192.168.0.1";
DnsEndPoint hostEntry = new DnsEndPoint(Address, 80);
DeviceNetworkInformation.ResolveHostNameAsync(hostEntry, new NameResolutionCallback(nrr =>
{
if (Address == nrr.HostName)
{
    HostName = "unknown host";
}
else
{
    HostName = nrr.HostName;
}
}), null);

And HostName always is "unknown host". Please tell me, where is my mistake.

Kara
  • 6,115
  • 16
  • 50
  • 57

1 Answers1

0

Looks like your problem is that in your average home environment you do not have DNS servers at all so your not going to be resolving internal IP addresses of your home computers using DNS. You'll need to use NetBIOS names for that.

Ashigore
  • 4,618
  • 1
  • 19
  • 39