Hi Serge,
Do you have the machine name or DNS name of the machine? If so you can use
System.Net.Dns.GetHostByName("theName") to get the IP address(es) for the
machine.
Such as:
IPHostEntry hostInfo = Dns.GetHostByName("jimblizz01");
Console.WriteLine("host name: " + hostInfo.HostName);
IPAddress[] address = hostInfo.AddressList;
Console.WriteLine("\nIP address list : ");
for(int index=0; index < address.Length; index++)
{
Console.WriteLine(address[index]);
}
Console.ReadLine();
Hope this helps,
- bliz
Jim Blizzard, MCSD .NET |
http://www.snowstormlife.com/blog
Community Developer Evangelist |
http://www.microsoft.com/communities
This posting is provided AS IS, without warranty and confers no rights.
"serge calderara" <se*************@maillefer.net> wrote in message
news:0a****************************@phx.gbl...
Dear all,
I have a tool which is able to receive any kind of data
from a remote system.
For that I need to get the ipadress of the remote system.
If the system is not connected to a DHCP server no
problem , I set in my configuration the ip adress.
Then if my remote system is connected to a DHCP server,
how can I get retriev the given IP adress ?
thanks for your help
regards
serge