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

MP3 Bunker elcrow at gmail.com
Sat Jul 31 19:17:33 EDT 2004


yes, but it only return 2 addresses. thats why i put there only 2.



On Sat, 31 Jul 2004 23:29:47 +0200, rob.tillie at student.tul.edu
<rob.tillie at student.tul.edu> wrote:
> 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