ASP.NET end response without ThreadAbortException

Thanks to this answer on StackOverflow for this answer:

// Sends all currently buffered output to the client.
// Gets or sets a value indicating whether to send HTTP content to the client.
HttpContext.Current.Response.SuppressContent = true;  
// Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the EndRequest event.

Leave a Reply

Your email address will not be published.