[Mono-bugs] [Bug 337368] New: HttpListener cannot be re-started after stopped

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Oct 27 09:06:28 EDT 2007


           Summary: HttpListener cannot be re-started after stopped
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: 32bit
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: dbera.web at gmail.com
         QAContact: mono-bugs at ximian.com
          Found By: Other

MSDN says that HttpListener.Stop() can be followed by HttpListener.Start(). I
checked the source and Stop() set disposed=true; thus rendering its reuse

using System;
using System.Net;

class abcd {
        public static void Main ()
                HttpListener l = new HttpListener ();
                l.Prefixes.Add ("http://*:4000/foo/");
                l.Start ();
                l.Stop ();
                l.Start ();
                Console.Read ();

Unhandled Exception: System.ObjectDisposedException: The object was used after
being disposed.
  at System.Net.HttpListener.CheckDisposed () [0x00000]
  at System.Net.HttpListener.Start () [0x00000]
  at abcd.Main () [0x00000]

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