This problem occurs when the endResponse parameter of the HttpResponse.Redirect method is not set to false. By default, the endResponse parameter is set to true.
Instead of Response.End();
Use HttpContext.Current.Response.End();
or
use HttpContext.Current.ApplicationInstance.CompleteRequest()
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
60 Points
108 Posts
Thread Abort
Feb 28, 2018 12:38 PM|KALYANA ALLAM|LINK
I am receiving this exception,when I try to load the report ,it executes for around 5 minutes and throws the error
"Server returned 404:Not Found response. Page will be reloaded when you click "OK""
The Log shows the below exception.
System.Threading.ThreadAbortException: Thread was being aborted.
Anythoughts on how to resolve this error.
All-Star
48490 Points
18071 Posts
Re: Thread Abort
Feb 28, 2018 12:55 PM|PatriceSc|LINK
Hi,
Some context could help. It looks like a https://msdn.microsoft.com/en-us/library/system.web.httpserverutility.scripttimeout(v=vs.110).aspx that you could increase (or if using SSRS or Crystal report, it might be a timeout option in the service client to tell the server how much time is allowed).
You could also double check why it takes that much time (for example showing more data than the user really need).
Star
8670 Points
2882 Posts
Re: Thread Abort
Mar 01, 2018 06:08 AM|Cathy Zou|LINK
Hi KALYANA ALLAM
This problem occurs when the endResponse parameter of the HttpResponse.Redirect method is not set to false. By default, the endResponse parameter is set to true.
Instead of Response.End();
Use HttpContext.Current.Response.End();
or
use HttpContext.Current.ApplicationInstance.CompleteRequest()
Related link:
https://support.microsoft.com/en-us/help/918181/fix-you-receive-a-threadabortexception-exception-in-an-asp-net-web-app
Best regards
Cathy
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
60 Points
108 Posts
Re: Thread Abort
Mar 01, 2018 02:04 PM|KALYANA ALLAM|LINK
Hi,
Thanks for the suggestion will try it out and will get back to you.
Member
60 Points
108 Posts
Re: Thread Abort
Mar 01, 2018 02:04 PM|KALYANA ALLAM|LINK
Hi,
Thanks for the suggestion will try it out and will get back to you.
Member
60 Points
108 Posts
Re: Thread Abort
Mar 14, 2018 12:37 PM|KALYANA ALLAM|LINK
As per logs the thread abort is being caused by IIS timeouts.Added this to increase the IIS timeout .thus avoiding thread aborts
<system.web>
<httpRuntime executionTimeout="999"/>
</system.web>