"Aborting thread" error resolution in ASP.

Source: Internet
Author: User

The project "Aborting Threads" issue, Baidu backstage found, all because of the use of Response.End, Response.Redirect or Server.Transfer method.

Reason:

The Response.End method terminates the execution of the page and switches this execution to the Application_EndRequest event in the application's event pipeline, without executing the line of code that follows Response.End.

The Response.Redirect and Server.Transfer methods are internally called Response.End.

Workaround:

HttpContext.Current.ApplicationInstance.CompleteRequest substitution Response.End;

The overloaded method of Response.Redirect response.redirect (String URL, bool endresponse), which overrides the Response.Redirect, which is passed by the Endresponse parameter of the overloaded method False to cancel the internal invocation of the Response.End;

Server.Execute replaces Server.Transfer.

"Aborting thread" error resolution in ASP.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.