[Mono-bugs] [Bug 456723] New: System.Net.GetHostByName throwing SocketException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 5 05:19:56 EST 2008


           Summary: System.Net.GetHostByName throwing SocketException
           Product: Mono: Class Libraries
           Version: 1.9
          Platform: x86
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: sojankallara at yahoo.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Other


Itried the following code which works fine under windows.
but it is throwing a SocketException in Fedora 9(Mono 1.9)

My code is 
IPAddress address in Dns.GetHostByName(Environment.MachineName).AddressList

IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName());

both are throwing same exception

the exception message is added below

xception occured in GetIPAddress System.Net.Sockets.SocketException: No such
host is known
  at System.Net.Dns.hostent_to_IPHostEntry (System.String h_name,
System.String[] h_aliases, System.String[] h_addrlist) [0x000aa] in
  at System.Net.Dns.GetHostByName (System.String hostName) [0x0002a] in
  at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x0004c] in
  at System.Net.Dns.GetHostAddresses (System.String hostNameOrAddress)
[0x00050] in
  at ITVServerTest.DummyServer.GetIPAddress () [0x00006] in

Please help me to solve this problem

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list