[Mono-bugs] [Bug 66752][Wis] New - Thread was being aborted for ASP.NET pages with VB.NET code
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 23 Sep 2004 19:28:16 -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 rogerio.araujo@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=66752
--- shadow/66752 2004-09-23 19:28:16.000000000 -0400
+++ shadow/66752.tmp.23703 2004-09-23 19:28:16.000000000 -0400
@@ -0,0 +1,128 @@
+Bug#: 66752
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: rogerio.araujo@gmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Thread was being aborted for ASP.NET pages with VB.NET code
+
+Sometimes i got this error when i try to run ASP.NET pages with VB.NET code:
+
+System.Threading.ThreadAbortException: Thread was being aborted
+in [0x000e1] (at
+/tmp/cvs/.NET/mcs/class/System.Web/System.Web/HttpApplication.cs:741)
+StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool&)
+in [0x000ec] (at
+/tmp/cvs/.NET/mcs/class/System.Web/System.Web/HttpApplication.cs:671)
+StateMachine:ExecuteNext (System.Exception)
+in [0x00023] (at
+/tmp/cvs/.NET/mcs/class/System.Web/System.Web/HttpApplication.cs:636)
+StateMachine:ExecuteNextAsync (System.Exception)
+in [0x00008] (at
+/tmp/cvs/.NET/mcs/class/System.Web/System.Web/HttpApplication.cs:628)
+StateMachine:Start ()
+in <0x00059>
+System.Web.HttpApplication:IHttpAsyncHandler.BeginProcessRequest
+(System.Web.HttpContext,System.AsyncCallback,object)
+in [0x000b0] (at
+/tmp/cvs/.NET/mcs/class/System.Web/System.Web/HttpRuntime.cs:298)
+System.Web.HttpRuntime:InternalExecuteRequest (System.Web.HttpWorkerRequest)
+
+
+
+Steps to reproduce the problem:
+1. Put a button, label, datagrid and textbox controls in a page.
+2. In a onclick event of the button, put the name of a method that fill
+datagrid with some data retrieved from an MySql table.
+3. Try to load the page.
+
+Actual Results:
+The page is not being loaded
+
+Expected Results:
+The page load without errors
+
+How often does this happen?
+Always
+
+Additional Information:
+
+The testcase
+------------
+
+<%@ language="VB" %>
+<%@ import namespace="System" %>
+<%@ import namespace="System.Data" %>
+<%@ import namespace="ByteFX.Data" %>
+<%@ import namespace="ByteFX.Data.MySqlClient" %>
+
+<html>
+ <head>
+ <title></title>
+ <meta content="">
+ </head>
+ <script runat="server">
+ sub Page_Load (o as object, e as EventArgs)
+
+ end sub
+
+ sub FiltroAlterado (sender as object, e as EventArgs)
+ Dim connectionString as string = "Server=localhost;Database=dados;User
+ID=root;Password=1978rpa;"
+ Dim dbcon as MySqlConnection
+ dbcon = New MySqlConnection(connectionString)
+ dbcon.Open()
+ Dim dbcmd as MySqlCommand = dbcon.CreateCommand()
+ Dim sql as string = "SELECT * FROM cadastros Where nome Like '" &
+txtNome.Text & "%'"
+ dbcmd.CommandText = sql
+
+ Dim adapter as MySqlDataAdapter = New MySqlDataAdapter(dbcmd)
+ Dim dataSet as DataSet = New DataSet ()
+ adapter.Fill(dataSet, "Contatos")
+
+ dg.DataSource = dataSet
+ dg.DataBind ()
+ end sub
+ </script>
+<body>
+<form runat="server">
+<center>
+<asp:label Text="Nome: " runat="server"/>
+<asp:TextBox id="txtNome" Text="" TextMode="singleLine" runat="server"
+maxlength=40 />
+<asp:Button id="btn" Text="Pesquisar" OnClick="FiltroAlterado"
+runat="server"/>
+<br>
+<asp:datagrid id="dg" border="1" AutoGenerateColumns="false"
+EnableViewState="false" runat="server">
+
+<Columns>
+<asp:BoundColumn HeaderText="Nome" DataField="nome"
+ItemStyle-CssClass="Normal" HeaderStyle-Cssclass="Bold" />
+
+<asp:BoundColumn HeaderText="Telefone" DataField="fone_contato_1"
+ItemStyle-CssClass="Normal" HeaderStyle-Cssclass="Bold"/>
+
+<asp:BoundColumn HeaderText="Endereco" DataField="endereco"
+ItemStyle-CssClass="Normal" HeaderStyle-Cssclass="Bold"/>
+
+<asp:BoundColumn HeaderText="E-Mail" DataField="e_mail"
+ItemStyle-CssClass="Normal" HeaderStyle-Cssclass="Bold"/>
+</Columns>
+
+</asp:datagrid>
+</center>
+</form>
+</body>
+</html>