[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


https://bugzilla.novell.com/show_bug.cgi?id=456723


           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


Hi,

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

and 
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
/builddir/build/BUILD/mono-1.9.1/mcs/class/System/System.Net/Dns.cs:211 
  at System.Net.Dns.GetHostByName (System.String hostName) [0x0002a] in
/builddir/build/BUILD/mono-1.9.1/mcs/class/System/System.Net/Dns.cs:357 
  at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x0004c] in
/builddir/build/BUILD/mono-1.9.1/mcs/class/System/System.Net/Dns.cs:289 
  at System.Net.Dns.GetHostAddresses (System.String hostNameOrAddress)
[0x00050] in
/builddir/build/BUILD/mono-1.9.1/mcs/class/System/System.Net/Dns.cs:316 
  at ITVServerTest.DummyServer.GetIPAddress () [0x00006] in
/home/Sojan/ITV/ITVFramework/ITVFrameworkTest/ITVServerTest/DummyServer.cs:94 

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