DominusDRR
Member
- Joined
- Nov 19, 2021
- Messages
- 10
- Programming Experience
- 5-10
Hi.
I have an application made in C# and Android.
The application tries to get the hostname of an IP as follows:
It worked very well until now in a home network, it did not return the name of some computers connected to the network.
To rule out that it is a problem with my application, I used a software that allows scanning all the IP addresses of a lan network and in the same way, it cannot obtain the name of the devices, only their IP address and MAC address:
So I think it may be a router configuration problem.
Any comments or suggestions are welcome.
I have an application made in C# and Android.
The application tries to get the hostname of an IP as follows:
Search for HostName by IP address:
private string GetHostName(string ipAddress)
{
try
{
IPHostEntry entry = Dns.GetHostEntry(ipAddress);
if (entry != null)
{
return entry.HostName;
}
}
catch (SocketException)
{
return "";
}
return "";
}
It worked very well until now in a home network, it did not return the name of some computers connected to the network.
To rule out that it is a problem with my application, I used a software that allows scanning all the IP addresses of a lan network and in the same way, it cannot obtain the name of the devices, only their IP address and MAC address:
So I think it may be a router configuration problem.
Any comments or suggestions are welcome.