ASP.NET 2.0 (NEW BUG)

Discussion in 'ASP .Net' started by Amelyan, Dec 17, 2005.

  1. Amelyan

    Amelyan Guest

    Did you know that every time you do Response.Redirect, it thrown an
    exception

    System.Threading.ThreadAbortException: Thread was being aborted.
    at System.Threading.Thread.AbortInternal()
    at System.Threading.Thread.Abort(Object stateInfo)
    at System.Web.HttpResponse.End()
    at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
    at System.Web.HttpResponse.Redirect(String url)
    at Default2.imgButton_Click(Object sender, EventArgs e)

    You just don't see it because your Response.Redirect is not in try/catch
    block. Try putting your Response.Redirect in try/catch block and you will
    see the problem.

    If anyone has an explanation, more than welcome to share.

    Thanks,
    -Amelyan
    Amelyan, Dec 17, 2005
    #1
    1. Advertising

  2. Amelyan

    Shawn Guest

    Hi.
    This is not a bug, it is there by design to ensure that the execution on the
    page stops. If you want you can prevent the execution from stopping:
    http://support.microsoft.com/kb/312629/EN-US/

    Shawn


    "Amelyan" <> wrote in message
    news:...
    Did you know that every time you do Response.Redirect, it thrown an
    exception

    System.Threading.ThreadAbortException: Thread was being aborted.
    at System.Threading.Thread.AbortInternal()
    at System.Threading.Thread.Abort(Object stateInfo)
    at System.Web.HttpResponse.End()
    at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
    at System.Web.HttpResponse.Redirect(String url)
    at Default2.imgButton_Click(Object sender, EventArgs e)

    You just don't see it because your Response.Redirect is not in try/catch
    block. Try putting your Response.Redirect in try/catch block and you will
    see the problem.

    If anyone has an explanation, more than welcome to share.

    Thanks,
    -Amelyan
    Shawn, Dec 17, 2005
    #2
    1. Advertising

  3. Amelyan

    Daniel TIZON Guest

    "Amelyan" <> a écrit dans le message de news:
    ...
    > Did you know that every time you do Response.Redirect, it thrown an
    > exception
    >
    > System.Threading.ThreadAbortException: Thread was being aborted.
    > at System.Threading.Thread.AbortInternal()
    > at System.Threading.Thread.Abort(Object stateInfo)
    > at System.Web.HttpResponse.End()
    > at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
    > at System.Web.HttpResponse.Redirect(String url)
    > at Default2.imgButton_Click(Object sender, EventArgs e)
    >
    > You just don't see it because your Response.Redirect is not in try/catch
    > block. Try putting your Response.Redirect in try/catch block and you will
    > see the problem.
    >
    > If anyone has an explanation, more than welcome to share.
    >
    > Thanks,
    > -Amelyan
    >
    Daniel TIZON, Dec 17, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edward Yang
    Replies:
    4
    Views:
    652
    Chris Cummings
    Jul 8, 2003
  2. Flare
    Replies:
    1
    Views:
    476
    William F. Robertson, Jr.
    Sep 21, 2004
  3. RedEye
    Replies:
    2
    Views:
    581
    Jason Kester
    Dec 13, 2005
  4. shapper
    Replies:
    0
    Views:
    552
    shapper
    Nov 26, 2007
  5. Replies:
    2
    Views:
    450
    Thomas 'PointedEars' Lahn
    Mar 11, 2008
Loading...

Share This Page