[Mono-bugs] [Bug 79954][Nor] New - FIX: Web service closes the InputStream before the execution of the web method
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Nov 16 23:16:09 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 juancri at tagnet.org.
http://bugzilla.ximian.com/show_bug.cgi?id=79954
--- shadow/79954 2006-11-16 23:16:09.000000000 -0500
+++ shadow/79954.tmp.19585 2006-11-16 23:16:09.000000000 -0500
@@ -0,0 +1,38 @@
+Bug#: 79954
+Product: Mono: Class Libraries
+Version: 1.0
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web.Services
+AssignedTo: lluis at ximian.com
+ReportedBy: juancri at tagnet.org
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: FIX: Web service closes the InputStream before the execution of the web method
+
+The Context.Request.InputStream was disposed before the execution of the
+web method call from the client side.
+
+For example, this method throws a ObjectDisposedException:
+
+[WebMethod]
+public string ReadSoap (string argument1, string argument2)
+{
+ Stream iStream = this.Context.Request.InputStream;
+ iStream.Seek (0, SeekOrigin.Begin);
+ using (StreamReader reader = new StreamReader (iStream))
+ return reader.ReadToEnd ();
+}
+
+This bug was caused because in HttpSoapWebServiceHandler.DeserializeRequest
+(HttpRequest request), where the InputStream was inside a "using" block,
+and also the stream is readed by a XmlReader and after, the XmlReader.Close
+() method was called.
+
+Patch is also attached.
More information about the mono-bugs
mailing list