Showing posts with label threading. Show all posts
Showing posts with label threading. Show all posts

Tuesday, March 13, 2012

Thread was being aborted

I am getting an exception

when i print e.message it is::'Thread was being aborted.'

e.stacktrace is:: 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 EmailMessage.BtnSendMail_Click(Object sender, EventArgs e)'

what should i do?

Hey,

With your Response.Redirect statement, make it Response.Redirect("url destination", false);


Hi sujithukvl,

"thread was being aborted" is an known issue. you can find more detailed information by clicking the following links.

http://communityserver.org/forums/p/475527/556989.aspx

http://www.msdner.com/forum/thread261068.html

http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic3899.aspx

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Thread was being aborted in Response.Redirect

I am logging the following error when re-directing via Response.Redirect:
"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 ..."
It doesn't interfere with the functionality and is transparent, and the only
reason I know it is tripped is because I write the errors to a log.
I am doing some processing in my code-behind, and after processing simply
re-direct to the next page. Is there a proper way of ending things before
re-directing?
I have used the boolean parameter for ending the thread, but it seems to
have no effect.
Thanks,
gsk
http://www.meblogic.comthis is normal, Response.End() is implemented as a thread abort.
-- bruce (sqlwork.com)
"GSK" <gsk@.NiOcSaP.nAeMt> wrote in message
news:uAXMCCYTEHA.1168@.TK2MSFTNGP11.phx.gbl...
> I am logging the following error when re-directing via Response.Redirect:
> "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 ..."
> It doesn't interfere with the functionality and is transparent, and the
only
> reason I know it is tripped is because I write the errors to a log.
> I am doing some processing in my code-behind, and after processing simply
> re-direct to the next page. Is there a proper way of ending things before
> re-directing?
> I have used the boolean parameter for ending the thread, but it seems to
> have no effect.
> Thanks,
> gsk
> http://www.meblogic.com
>
>