[Mono-bugs] [Bug 491343] New: HttpRuntime.Cache instance causes HttpListener to crash in console application
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Apr 1 23:35:53 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=491343
Summary: HttpRuntime.Cache instance causes HttpListener to
crash in console application
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: i386
OS/Version: openSUSE 11.1
Status: NEW
Severity: Critical
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: ray at memphiswebtech.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.8)
Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)
If I create a Cache object from HttpRuntime.Cache then try to create and start
an HttpListener the program crashes with an unhanded exception.
I can successfully instantiate these objects independently, but together things
blow up. Thank you.
Reproducible: Always
Steps to Reproduce:
// instantiating a Cache object before a HttpListener object
// crashes the Start() method.
Cache cache = HttpRuntime.Cache;
cache["hello"] = "world";
System.Net.HttpListener listener = new System.Net.HttpListener();
listener.Prefixes.Add("http://192.168.1.101:8081/");
listener.Start();
Console.WriteLine(listener.IsListening);
Actual Results:
Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for System.Net.Sockets.Socket --->
System.NullReferenceException: Object reference not set to an instance of an
object
at System.Web.Configuration.WebConfigurationManager.GetSectionCacheKey
(System.String sectionName, System.String path) [0x00000] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs:487
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String
sectionName, System.String path) [0x00000] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs:313
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String
sectionName) [0x00000] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs:308
at
System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection
(System.String configKey) [0x00000] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System.Web/System.Web/UplevelHelper.cs:1
at System.Configuration.ConfigurationManager.GetSection (System.String
sectionName) [0x00000] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs:162
at System.Net.Sockets.Socket.CheckProtocolSupport () [0x0003c] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System/System.Net.Sockets/Socket.cs:1342
at System.Net.Sockets.Socket..cctor () [0x0000c] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System/System.Net.Sockets/Socket.cs:601
--- End of inner exception stack trace ---
at System.Net.EndPointListener..ctor (System.Net.IPAddress addr, Int32 port,
Boolean secure) [0x00028] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System/System.Net/EndPointListener.cs:58
at System.Net.EndPointManager.GetEPListener (System.Net.IPAddress addr, Int32
port, System.Net.HttpListener listener, Boolean secure) [0x00064] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System/System.Net/EndPointManager.cs:96
at System.Net.EndPointManager.AddPrefixInternal (System.String p,
System.Net.HttpListener listener) [0x00050] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System/System.Net/EndPointManager.cs:78
at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener)
[0x0002a] in
/usr/src/packages/BUILD/mono-2.4/mcs/class/System/System.Net/EndPointManager.cs:49
Expected Results:
HttpListener object should listen on prefix, not causing an unhandled
exception.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list