I have a dotnet core 3.1 application that is computational intensive, i.e. response for request might delay for a few minutes, accordingly I am monitoring the FIN or HttpContext.RequestAborted,
Lets say an example of code would be
public async Task<IActionResult> Get(string request)
{
await _process.IntensiveTaskAsync(HttpContext.RequestAborted);
return Ok();
}
Now that works fine in many environments include linux, IIS, nginx (proxy) .. Meaning that my "IntensiveTaskAsync" will orderly terminated on CancellationToken (i.e. User terminate the request) .. However when the code now is hosted in Azure Web App from Container (linux) it doesn't work. Is there any configuration required for that to work noting that currently the Service is hosted in Dev SKU B1
I know this question is old but I've been struggling with this for a while now. By this GitHub issue, I believe it is actually an Azure infrastructure issue:
https://github.com/dotnet/aspnetcore/issues/20229#issuecomment-623289191