[Mono-bugs] [Bug 604502] New: HttpServerUtility.Execute() fails with ASP.Net MVC 2

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 10 18:13:53 EDT 2010



           Summary: HttpServerUtility.Execute() fails with ASP.Net MVC 2
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: oskar.berggren at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:
Gecko/20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9

I'm experimenting with ASP.NET MVC 2 and just added a call to
RenderAction(). This seems to show a problem with HttpServerUtility:

System.NullReferenceException: Object reference not set to an instance
of an object
 at System.Web.HttpServerUtility.Execute (IHttpHandler handler,
System.IO.TextWriter writer, Boolean preserveForm, System.String
exePath, System.String queryString, Boolean isTransfer, Boolean
isInclude) [0x00124] in

In Mono 2.6.4, around line 184 of HttpServerUtility.cs is this:

179     if (!(handler is IHttpAsyncHandler)) {
180         handler.ProcessRequest (context);
181     } else {
182         IHttpAsyncHandler asyncHandler = (IHttpAsyncHandler) handler;
183         IAsyncResult ar = asyncHandler.BeginProcessRequest (context,
null, null);
184         ar.AsyncWaitHandle.WaitOne ();
185         asyncHandler.EndProcessRequest (ar);
186     }

In ASP.Net MVC 2, MvcHandler implements IHttpAsyncHandler and will in some
cases (e.g. when using RenderAction() to call a controller which is _not_
asynchronous) return an IAsyncResult whose AsyncWaitHandle property returns

E.g. from SimpleAsyncResult:
   // ASP.NET IAsyncResult objects should never expose a WaitHandle due to
potential deadlocking
   public WaitHandle AsyncWaitHandle { get { return null; } }

Reproducible: Always

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