Welcome, Guest. Please login or register.
Did you miss your activation email?
Javaforums.net/forum :: A friendly community for software developers and students that want to learn Java! « Javaforums.net .NET programming boards (modify) « ASP.NET «  (Moderator: OutRunner)Topic: A first chance exception of type 'System.Threading.ThreadAbortException' occurre
Pages: [1]   Go Down
  Print  
Author Topic: A first chance exception of type 'System.Threading.ThreadAbortException' occurre  (Read 899 times)
0 Members and 1 Guest are viewing this topic.
Arkie
Javaforums.net Admin
Senior Member
*

Reputation: 16
Developer @ Javaforums.net
Offline Offline
Posts: 2593
Referrals: 13

WWW Awards
« on: August 18, 2009, 10:09:11 AM »

Quote
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code

You get this error when you try to redirect to another page while the code is being run within a try/catch block on the current page. The solution is to set the endresponse to false like this:

Response.Redirect("~\\yourPage.aspx", false);

instead of
Response.Redirect("~\\yourPage.aspx");

Although i still need to figure out why it happens, any idea?
Logged

Java and .NET developer

To students: It doesn't matter how hard you've studied; the material won't be on the exam anyway.

Fan of http://www.retardedweblogger.com
Oh man, too much stuff to do in so little time.

http://img222.imageshack....707/arkietomatoesmall.jpg
Blizzcon 2k9 Grubby and Cassandra Ng engaged ! <3
Triple D, eerste Denken Dan Doen
Pages: [1]   Go Up
  Print  
Javaforums.net/forum :: A friendly community for software developers and students that want to learn Java! « Javaforums.net .NET programming boards (modify) « ASP.NET «  (Moderator: OutRunner)Topic: A first chance exception of type 'System.Threading.ThreadAbortException' occurre
 
Jump to:  

Your Ad Here