[Mono-bugs] [Bug 75926][Wis] New - System.InvalidCastException in System.Web.HttpApplication:OutputPage

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Aug 28 23:14:52 EDT 2005


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 ripple at ripple.be.

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

--- shadow/75926	2005-08-28 23:14:52.000000000 -0400
+++ shadow/75926.tmp.28991	2005-08-28 23:14:52.000000000 -0400
@@ -0,0 +1,87 @@
+Bug#: 75926
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: mono HEAD
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: ripple at ripple.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.InvalidCastException in System.Web.HttpApplication:OutputPage
+
+Applies to -r 49051 of trunk.
+
+The .aspx app below is supposed to construct and send some headers, then
+send a file.  I've been testing it with both xsp and xsp2 on localhost. 
+When sending a very large file (I was using 1.5gig), breakage occurs at
+varying places in the send, yielding:
+
+Internal error: we are missing one catch System.InvalidCastException:
+Cannot cast from source type to destination type.
+in <0x001f1> System.Web.HttpApplication:OutputPage ()
+in <0x00014> System.Web.HttpApplication:PipelineDone ()
+
+Note that this occurs prior to completion.  Here is the app I used to cause
+this behavior:
+
+<%@ Import namespace="System.IO" %>
+<%@ Page debug = "true" Buffer = "false" %>
+
+<script language="C#" runat="server">
+        public void Page_Load(Object sender, EventArgs e)
+        {
+                const string file = "larg_binary_file.avi";
+
+                FileInfo fi = new FileInfo(file);
+
+                string fileMod = fi.LastWriteTimeUtc.ToString();
+                string fileSize = fi.Length.ToString();
+                string fileSize1 = (fi.Length - 1).ToString();
+
+                this.Response.StatusCode = 206;
+                this.Response.StatusDescription = "Partial Content";
+
+                this.Response.ContentType = "video/x-msvideo";
+
+                this.Response.AppendHeader("Connection", "close");
+                this.Response.AppendHeader("Last-Modified", fileMod);   
+                this.Response.AppendHeader("Content-Range", "bytes 0-" +
+fileSize1 + "/" + fileSize);
+                this.Response.AppendHeader("Content-Length", fileSize);
+
+                this.Response.Flush();
+
+                this.Response.WriteFile(file);
+        }
+</script>
+
+By the way before that patch yesterday I couldn't even get this far.  Great
+work, and thanks.
+
+Steps to reproduce the problem:
+1. throw that app in a dir.  run xsp from the dir on localhost.
+2. connect via firefox, etc.  download.
+3. observe breakage.
+
+Actual Results:
+
+breakage above.
+
+Expected Results:
+
+successful download of file.
+
+How often does this happen? 
+
+always, but at varying positions in the file.
+
+Additional Information:
+
+I was testing with very large xvid avis.


More information about the mono-bugs mailing list