[Mono-bugs] [Bug 79882][Wis] New - Inferior debugging/exception handling in ASP.NET

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Nov 9 16:21:37 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by perlun at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79882

--- shadow/79882	2006-11-09 16:21:37.000000000 -0500
+++ shadow/79882.tmp.16053	2006-11-09 16:21:37.000000000 -0500
@@ -0,0 +1,142 @@
+Bug#: 79882
+Product: Mono: Tools
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Ubuntu Dapper Drake
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: XSP
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: perlun at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Inferior debugging/exception handling in ASP.NET
+
+My conclusion is that the exception handling, in other words the ability 
+to debug the application you are developing, is inferior in ASP.NET on 
+Mono than on IIS with Windows. This is the output of an exception on Linux:
+
+Server error in '/' application
+
+---------------------------------------------------------------------------
+-----
+
+Description: Error processing request. 
+Error Message: HTTP 500. 
+
+Stack Trace: System.ArgumentOutOfRangeException: < 0
+Parameter name: length
+in <0x000cf> System.String:Substring (Int32 startIndex, Int32 length)
+in <0x00051> ASP.test_aspx:__RenderTree (System.Web.UI.HtmlTextWriter 
+__output, System.Web.UI.Control parameterContainer)
+in (wrapper delegate-invoke) 
+System.MulticastDelegate:invoke_void_HtmlTextWriter_Control 
+(System.Web.UI.HtmlTextWriter,System.Web.UI.Control)
+in <0x0002e> System.Web.UI.Control:RenderChildren 
+(System.Web.UI.HtmlTextWriter writer)
+in <0x00011> System.Web.UI.Control:Render (System.Web.UI.HtmlTextWriter 
+writer)
+in <0x00099> System.Web.UI.Control:RenderControl 
+(System.Web.UI.HtmlTextWriter writer)
+in <0x00450> System.Web.UI.Page:InternalProcessRequest ()
+in <0x000aa> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext 
+context)
+ 
+
+This is the same code generating an exception on Windows/IIS:
+
+Server Error in '/' Application.
+---------------------------------------------------------------------------
+-----
+
+Length cannot be less than zero.
+Parameter name: length 
+Description: An unhandled exception occurred during the execution of the 
+current web request. Please review the stack trace for more information 
+about the error and where it originated in the code. 
+
+Exception Details: System.ArgumentOutOfRangeException: Length cannot be 
+less than zero.
+Parameter name: length
+
+Source Error: 
+
+
+Line 13: 
+Line 14: // crashes
+Line 15: Response.Write(s.Substring(0, -1));
+Line 16: 
+Line 17: %>
+ 
+
+Source File: d:\Inetpub\wwwroot\test.aspx    Line: 15 
+
+Stack Trace: 
+
+
+[ArgumentOutOfRangeException: Length cannot be less than zero.
+Parameter name: length]
+   System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 
+length, Boolean fAlwaysCopy) +312
+   ASP.test_aspx.__Render__control1(HtmlTextWriter __w, Control 
+parameterContainer) in d:\Inetpub\wwwroot\test.aspx:15
+   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
+ICollection children) +113
+   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
+   System.Web.UI.Page.ProcessRequestMain(Boolean 
+includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4702
+
+ 
+
+
+---------------------------------------------------------------------------
+-----
+Version Information: Microsoft .NET Framework Version:2.0.50727.42; 
+ASP.NET Version:2.0.50727.210 
+
+The exception details and the source snippet is highly helpful in finding 
+and nailing down the bug. For the moment, I could not recommend people 
+using Mono for developing ASP.NET applications because of this and other 
+reasons.
+
+A small source snippet that can be used to reproduce this:
+
+<%@ Page Language="C#" 
+	AutoEventWireup="False"
+  	EnableSessionState="True"
+  	EnableViewState="False"
+%>
+
+<%
+
+String s = "test";
+
+// works
+Response.Write(s.Substring(0, 1));
+
+// crashes
+Response.Write(s.Substring(0, -1));
+
+%>
+
+Comments? I am using the following Mono packages:
+
+ii  libapache2-mod-mono               1.1.10-
+1                               Run ASP.NET Pages on UNIX with Apache 2 and
+ii  mono                              1.1.13.6-
+0ubuntu3.1                    Mono CLI (.NET) runtime
+ii  mono-apache-server2               1.1.10-
+0ubuntu2                        backend for mod_mono2 Apache module
+ii  mono-jit                          1.1.13.6-
+0ubuntu3.1                    fast CLI JIT/AOT compiler for Mono
+ii  mono-classlib-1.0                 1.1.13.6-
+0ubuntu3.1                    Mono class library (1.0)
+ii  mono-classlib-2.0                 1.1.13.6-
+0ubuntu3.1                    Mono class library (2.0)
+
+...etc. If this is fixed in a later Mono than 1.1.13 or in Mono 1.2, 
+please let me know and we can close this bug immediately.


More information about the mono-bugs mailing list