Skip to content

Add MVC filter to remove result if End() was called #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2022

Conversation

twsouthwick
Copy link
Member

On ASP.NET Framework, HttpResponse.End() would flush everything and terminate the pipeline at the next available moment (sometimes it would raise a ThreadAbortException, but not always). To mimic this, we can add an MVC filter that will remove any result that may have been added so that the MVC pipeline will not attempt to write anything.

Fixes #111

@twsouthwick twsouthwick merged commit 98f2597 into main Aug 6, 2022
@twsouthwick twsouthwick deleted the tasou/response-end branch August 6, 2022 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response.End not working inside Razor Class Library
2 participants