[Mono-bugs] [Bug 65613][Maj] New - Server.Transfer() to the submitted page results in infinite loop (possibly because of IsPostBack)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 9 Sep 2004 12:07:53 -0400 (EDT)


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 atsushi@ximian.com.

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

--- shadow/65613	2004-09-09 12:07:53.000000000 -0400
+++ shadow/65613.tmp.23418	2004-09-09 12:07:53.000000000 -0400
@@ -0,0 +1,71 @@
+Bug#: 65613
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: atsushi@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Server.Transfer() to the submitted page results in infinite loop (possibly because of IsPostBack)
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+---- testpage.aspx ----
+<%@ Page language="c#" %>
+<script runat="server">
+	public void ButtonPress (object o, EventArgs e)
+	{
+		Console.WriteLine ("--- button pressed ---");
+		Server.Transfer ("testpage.aspx");
+	}
+</script>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
+<html>
+<head>
+<title>Test</title>
+<meta name="CODE_LANGUAGE" Content="C#" />
+</head>
+<body>
+<form id="Test" method="post" runat="server">
+	<p>
+	<asp:Button id="SubmitButton" runat="server" text="Submit"
+onclick="ButtonPress"></asp:Button>
+	</p>
+</form>
+</body>
+</html>
+
+
+Steps to reproduce the problem:
+
+1. put the page above in ./foo.
+2. start xsp in ./foo
+3. browse http://localhost:8080/testpage.aspx
+4. press "Submit" button.
+
+Actual Results:
+Console continues to print "--- button pressed ---" lines.
+
+Expected Results:
+MS ASP.NET does not result in infinite loop.
+
+How often does this happen? 
+consistently.
+
+Additional Information:
+
+You can workaround this problem by using Response.Redirect() instead of
+Server.Transfer().
+
+I doubt that IsPostBack is incorrectly true (request values exist) and thus
+ ButtonPress event is recursively invoked.