[Mono-bugs] [Bug 52521][Nor] New - aspx file locked after invocation

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Dec 2003 18:13:37 -0500 (EST)


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 liyul@hotmail.com.

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

--- shadow/52521	2003-12-23 18:13:37.000000000 -0500
+++ shadow/52521.tmp.8052	2003-12-23 18:13:37.000000000 -0500
@@ -0,0 +1,39 @@
+Bug#: 52521
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: liyul@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: aspx file locked after invocation
+
+Symptom: 
+
+aspx file will be locked (in use) after invocation with xsp. subsequent
+change will fail.
+
+Fix: Not sure whether more caution has to be used, but add reader.Close()
+in InitParser method in AspGenerator.cs fixed it.
+
+		void InitParser (string filename)
+		{
+			StreamReader reader = new StreamReader (filename, WebEncoding.FileEncoding);
+			AspParser parser = new AspParser (filename, reader);
++			reader.Close();
+			parser.Error += new ParseErrorHandler (ParseError);
+			parser.TagParsed += new TagParsedHandler (TagParsed);
+			parser.TextParsed += new TextParsedHandler (TextParsed);
+			if (!pstack.Push (parser))
+				throw new ParseException (Location, "Infinite recursion detected
+including file: " + filename);
+			tparser.AddDependency (filename);
+		}