Home All Groups Group Topic Archive Search About

2.0: unexpected exception "Thread was being aborted"

Author
18 May 2006 6:53 AM
R.A.M.
Hello,
Could you help me plase?
I have an ASP.NET page with "Search" button; when button is clicked
Search_Click is called; here's the code:

    protected void Search_Click(object sender, EventArgs e)
    {
    Debug.WriteLine("WWWPage.Search_Click()");
    ...
    try
    {
        Response.Redirect("Searched.aspx");
    }
    catch (Exception ex)
    {
        Debug.WriteLine(
        "WWWPage.Search_Click(): exception: " +
        ex.Message);
    }
    }

Unfortunatelly Redirect does not work. Here what I found in Output
window:

WWWPage.Search_Click()
A first chance exception of type
'System.Threading.ThreadAbortException' occurred in mscorlib.dll
WWWPage.Search_Click(): exception: Thread was being aborted.
A first chance exception of type
'System.Threading.ThreadAbortException' occurred in
App_Web_2xx5zf8y.dll
An exception of type 'System.Threading.ThreadAbortException' occurred
in App_Web_2xx5zf8y.dll but was not handled in user code

Could you explain me please what is going on and how to correct the
problem? My .NET Framework setup was successful, I use Framework a few
months and there was no such problems.
Thank you very much.
/RAM/

Author
18 May 2006 9:37 AM
Kevin Spencer
See: http://support.microsoft.com/default.aspx?scid=kb;en-us;312629

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Complex things are made up of
lots of simple things.

Show quote
"R.A.M." <r_ahims***@poczta.onet.pl> wrote in message
news:gg5o621jqua254pqo15esbdkcgv5b993ib@4ax.com...
> Hello,
> Could you help me plase?
> I have an ASP.NET page with "Search" button; when button is clicked
> Search_Click is called; here's the code:
>
>    protected void Search_Click(object sender, EventArgs e)
>    {
> Debug.WriteLine("WWWPage.Search_Click()");
> ...
> try
> {
> Response.Redirect("Searched.aspx");
> }
> catch (Exception ex)
> {
> Debug.WriteLine(
> "WWWPage.Search_Click(): exception: " +
> ex.Message);
> }
>    }
>
> Unfortunatelly Redirect does not work. Here what I found in Output
> window:
>
> WWWPage.Search_Click()
> A first chance exception of type
> 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
> WWWPage.Search_Click(): exception: Thread was being aborted.
> A first chance exception of type
> 'System.Threading.ThreadAbortException' occurred in
> App_Web_2xx5zf8y.dll
> An exception of type 'System.Threading.ThreadAbortException' occurred
> in App_Web_2xx5zf8y.dll but was not handled in user code
>
> Could you explain me please what is going on and how to correct the
> problem? My .NET Framework setup was successful, I use Framework a few
> months and there was no such problems.
> Thank you very much.
> /RAM/
Author
19 May 2006 4:09 PM
R.A.M.
On Thu, 18 May 2006 05:37:07 -0400, "Kevin Spencer"
<kevin@DIESPAMMERSDIEtakempis.com> wrote:

It didn't help. Whatever I write:
Response.Redirect("Wyszukane.aspx", false);
Response.Redirect("Wyszukane.aspx", true);
Response.Redirect("Wyszukane.aspx");
I have the exception.
Please help.
/RAM/

AddThis Social Bookmark Button