Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Treat client FIN as request aborted #38

Open
cesarblum opened this issue Nov 7, 2016 · 16 comments
Open

Treat client FIN as request aborted #38

cesarblum opened this issue Nov 7, 2016 · 16 comments

Comments

@cesarblum
Copy link

cesarblum commented Nov 7, 2016

For context, see aspnet/KestrelHttpServer#1139

Once the change is made for the issue above, ANCM needs to be updated so Kestrel will have the same behavior when running behind IIS. Right now client FINs are not forwarded to Kestrel by ANCM.

cc @Tratcher

@Tratcher
Copy link
Member

Tratcher commented Nov 8, 2016

WebListener and ASP.NET 4 use HttpWaitForDisconnectEx for this: https://msdn.microsoft.com/en-us/library/windows/desktop/mt786505(v=vs.85).aspx

@davidfowl
Copy link
Member

davidfowl commented Aug 20, 2017

@pan-wang @shirhatti This needs to be fixed for SignalR to function properly and other scenarios...

@KeesCBakker
Copy link

Any action on this front?

@MrMint
Copy link

MrMint commented Nov 10, 2017

This is preventing us from cleanly cancelling long running requests when the client aborts.

@muratg
Copy link
Contributor

muratg commented Dec 20, 2017

Per triage: We'll need to schedule a meeting to decide the behavior we want for 2.1 timeline.

cc @davidfowl @anurse @Tratcher @pan-wang

@flavio1110
Copy link

Any news on it? Will this be fixed in 2.1?

@muratg muratg removed this from the 2.1.0-preview2 milestone Mar 5, 2018
@muratg
Copy link
Contributor

muratg commented Mar 5, 2018

Removing from preview2 (this repo is not used anyway)

@davidfowl
Copy link
Member

@shirhatti @pan-wang @jkotalik we need this in ANCM. What's the cost here?

@mikeomeara1
Copy link

My understanding (and please correct me if I'm wrong) is that this issue is keeping applications that use IIS as a reverse proxy from being able to properly cancel requests even though this issue was fixed in Kestrel 2.x (issue here).

With that presumption in mind:

  1. This doesn't look like it make it into the 2.1 previews...correct?
  2. If not, is there any update on when this is to be fixed?
  3. Is there anything that can be done to work around this fact without abandoning IIS wholesale (e.g. move to WebListener) while it's being worked?

I have an SO question open as well: https://stackoverflow.com/questions/50110101/kestrel-iis-reverse-proxy-requestaborted-not-triggered

Any input you have would be greatly appreciated.

@SamvelS
Copy link

SamvelS commented Jun 5, 2018

Issue is there for 2.1 release version as well.
One more SO question : https://stackoverflow.com/questions/50702303/cant-cancel-task-in-asp-net-core-action

@ti82
Copy link

ti82 commented Aug 24, 2018

Supposing this gets fixed in an upcoming release, because it is in the ANCM, will sites that use the RequestAborted token hosted in an Azure App Service automatically start working after IIS is updated?

@nenadvicentic
Copy link

Will this issue be fixed for final 2.2 release?

@muratg muratg modified the milestones: 2.1.0-rc1, Backlog Oct 8, 2018
alexanderabramov added a commit to alexanderabramov/web-cancel that referenced this issue Nov 30, 2018
@JesperTreetop
Copy link

One more vote in favor of fixing this. There's no point in having RequestAborted if it's not dependable, and this affects both "hitting F5 in Visual Studio [IIS Express]" as well as "hosting the app where Microsoft would rather I host it [Azure App Service]".

@Danielku15
Copy link

Danielku15 commented Mar 7, 2019

Another vote from my side. I was really surprised that such an essential behavior is not working. The whole cancellation chain within an application becomes irrelevant without somebody initiating a cancel. IIS+Kestrel is supposed to be the recommended setup for productive environments as direct IIS hosting is not officially supported out of the box (only via Owin hacks). HttpSys is okay, it is anyhow the core of IIS, but the raw usage is lacking of various features, I'm doubting that this should be the way to go nowadays, especially if you plan to target non Windows platforms too. Maybe it only my special application setup I am having that I do not have any cancellation at all, but I see this really as a critical issue not getting notified on a client request abort. If you have load intense operations on the backend (e.g. heavy SQL queries, file-IO etc.) those actions will continue to run even though it is not relevant for the client anymore.

I think anyhow that this repository is dead and issues in here do not get the necessary attention from the team as it should. In the main repository you would not get changed like that without feedback. If @muratg and @shirhatti agree, I would recommend to close the issue here and move it to aspnet/AspNetCore. If there is no response in a while, I will simply give it a shot and see what the guys at the main repo say.

@ti82
Copy link

ti82 commented Mar 7, 2019

IIS+Kestrel is supposed to be the recommended setup for productive environments as direct IIS hosting is not officially supported out of the box

As of .NET Core 2.2 this is not true. Here's a link

@Danielku15
Copy link

@ti82 You are right, looks like my statement was based on outdated information. Sorry about that. I striked-out this statement in my previous post. Nevertheless I think it does not change the problem that the ANCM does not report a aborted/closed connection further. I am working on a fresh ASP.net core 2.2 project with the AspNetCoreHostingModel set to InProcess and was suffering of this issue. Thats why I ultimately arrived here after reading tons of StackOverflow posts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests