An unhandled exception of type 'System.Threading.ThreadAbortException' occurred in Unknown Module.

L

Lee Simpson

Interesting problem. We have narrowed it down to the exact cause, and would
like an explanation of what's going on behind the scenes.

Simple bit of code:
OleDbConnection con = new OleDbConnection(@"data source=E:\My
Documents\Visual Studio
Projects\ThreadErrorTest\bin\Northwind.mdb;provider=Microsoft.Jet.OLEDB.4.0"
);
con.Open();
OleDbCommand cmd = new OleDbCommand("Select * from Customers", con);
OleDbDataReader reader = cmd.ExecuteReader();
while(reader.Read())
Response.Write(reader[1] + "<br>");
reader.Close();
con.Close();


Notice the connection string - it points to the BIN directory. This runs
fine, but try to run it in the debugger and watch the output window. The
thread gets torn down every request, but after the results are returned.
Move the db to another directory, and it works fine.

Weird
Lee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top