[Mono-bugs] [Bug 491974] New: DNS lookups from xsp2 hosted code fails (System.Net.Dns.GetHostEntry, etc)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Apr 3 13:26:35 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=491974
Summary: DNS lookups from xsp2 hosted code fails
(System.Net.Dns.GetHostEntry, etc)
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: peter at peterjohanson.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en; rv:1.9.0.8)
Gecko/20080528 Epiphany/2.22 Firefox/3.0
I hit this when trying to use a web-service from a new ASP.NET MVC project. The
calls to the webservice were throwing WebExceptions about NameResolutionFailed.
Digging further, just trying to do System.Net.Dns.GetHostEntry fails from
inside the web app. I will attach the simplest demo MVC app that produces the
error. If you would like a more barebones test case, I will try to produce one.
The exception is:
System.TypeInitializationException: An exception was thrown by the type
initializer for System.Net.Sockets.Socket ---> System.InvalidCastException:
Cannot cast from source type to destination type.
at System.Net.Sockets.Socket.CheckProtocolSupport () [0x0003c] in
/var/tmp/portage/dev-lang/mono-2.4/work/mono-2.4/mcs/class/System/System.Net.Sockets/Socket.cs:1342
at System.Net.Sockets.Socket..cctor () [0x0000c] in
/var/tmp/portage/dev-lang/mono-2.4/work/mono-2.4/mcs/class/System/System.Net.Sockets/Socket.cs:601
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Net.Dns:GetHostByName_internal
(string,string&,string[]&,string[]&)
at System.Net.Dns.GetHostByName (System.String hostName) [0x00011] in
/var/tmp/portage/dev-lang/mono-2.4/work/mono-2.4/mcs/class/System/System.Net/Dns.cs:362
at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00061] in
/var/tmp/portage/dev-lang/mono-2.4/work/mono-2.4/mcs/class/System/System.Net/Dns.cs:302
at System.Net.Dns.GetHostAddresses (System.String hostNameOrAddress)
[0x00065] in
/var/tmp/portage/dev-lang/mono-2.4/work/mono-2.4/mcs/class/System/System.Net/Dns.cs:328
at System.Web.HttpRequest.GetLocalHostAddresses () [0x00006] in
/var/tmp/portage/dev-lang/mono-2.4/work/mono-2.4/mcs/class/System.Web/System.Web/HttpRequest.cs:1476
If I try to load the configuration section trying to be loaded on
Socket.cs:1342, it seems to load a SettingsSection just fine.
Reproducible: Always
Steps to Reproduce:
1. Host soemthing in xsp2
2. Try to resolve a valid hostname (e.g via Dns.GetHostEntry)
Actual Results:
Exception!
Expected Results:
Hostname resolves.
--
Configure bugmail: http://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