23
Vote

Unhandled exception is being logged when client cancels requests still happens

description

It appears this issue was clsoed for some reason.
http://aspnetwebstack.codeplex.com/workitem/1797

It still happens on 5.2.3 and I posted details back in April of the error it gives. I get these everyday. (I am not using the workaround listed as this was supposed to be fixed)

comments

LLooz wrote Nov 30, 2015 at 8:31 AM

I have this issue too with asp.net web api 5.2.3

manikyalarao wrote Apr 6, 2016 at 6:44 AM

Please prioritize this issue we are facing the same issue with asp.net web api 5.2.3

manikyalarao wrote Apr 7, 2016 at 10:51 AM

Please let me know in which release you are planning to fix this issue

bunceg wrote Apr 8, 2016 at 11:07 AM

I'm getting this too. In my case the Cancellation token is setup within the webapi controller method, and set to cancel after xx seconds. So, the webapi itself if cancelling the request if it's taking too long (we depend on downstream systems so cancel if they are not responding in time), not an external client.

When the cancellation token fires, the webapi call is cancelled but the global exception handler (implementation of IExceptionHandler) is not fired at all. We get a 500 and then an unhandled ASP.NET exception in the Even Log.

WebApi 5.2.3

bunceg wrote Apr 8, 2016 at 11:11 AM

btw, the workaround listed (DelegatingHandler) doesn't work for me as the cancellation is happening from within the method itself after the delgating handler has been called

manikyalarao wrote May 3, 2016 at 11:00 AM

Core Team.. please respond in which release you are planning to fix this issue

uniprof wrote Oct 23, 2016 at 12:13 AM

Very close to the birthday !!!! ready for party?

tynorton wrote Nov 21, 2016 at 7:30 PM

Is this getting fixed?

AdamT wrote Apr 27 at 11:04 AM

Issue still exists. Any plan for a fix?

ArtemA wrote May 5 at 12:22 PM

Is there any workaround that works in Web API 5.2.3?

drmcclelland wrote Jul 18 at 3:09 PM

Same issue here - is there anything we can do to stop IIS from responding with a 500 and logging it in the IIS logs? This creates a "false positive" which is difficult to detect.