[Mono-devel-list] Problems with Dns.GetHostByName

Rob.Tillie at Student.tUL.EDU Rob.Tillie at Student.tUL.EDU
Sat Jul 31 17:29:47 EDT 2004


Hey,

Have you tried iterating all addresses instead of just the first 2?

Greetz,
-- Rob.

> -----Original Message-----
> From: MP3 Bunker [mailto:elcrow at gmail.com]
> Sent: Saturday, July 31, 2004 11:23 PM
> To: mono-devel-list at lists.ximian.com
> Subject: [Mono-devel-list] Problems with Dns.GetHostByName
> 
> i have this code:
>   	IPHostEntry host = Dns.GetHostByName(Dns.GetHostName());
> 	Console.WriteLine(host.AddressList[0].ToString());
> 	Console.WriteLine(host.AddressList[1].ToString());
> 
> but it shows me two times 127.0.0.1, i have two network cards, and one
> has a valid address, 192.168.2.50, but i get that, anyone knows why?
> im using slackware 10, mono 1.0.
> Thanks in advance
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list