Why is my asp.net application throwing ThreadAbortException?

前端 未结 5 892
天命终不由人
天命终不由人 2020-12-18 18:49

This is a self-explanatory question:

Why does this thing bubble into my try catch\'s even when nothing is wrong?

Why is it showing up in my log, hundreds of

5条回答
  •  不知归路
    2020-12-18 19:00

    As others have said, it occurs when you call Response.End() (which occurs when you call Response.Redirect without passing false as the second parameter). This is working as designed; typically, if you call Response.Redirect, you want the redirect to happen immediately. See this for more information:

    Response.Redirect and the ThreadAbortException

提交回复
热议问题