dotnet / dotnet/AspNetCore.Docs
ASP.NET Core - usage of CancellationToken doc
- Dominant language
- C#
- Stars
- 13.1k
- Forks
- 24.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 97
Description
After reading [this article on action binding for CancellationTokens](https://andrewlock.net/using-cancellationtokens-in-asp-net-core-mvc-controllers/), I looked through all the existing ASP.NET Core topics for any details on the same topic, but didn't find any.
Why: after reading the article above, ASP.NET Core's behavior is quite understandable but non-documented. In our scenario, we have some underlying resources used by the API which could not open a connection before the client timed out. Our HttpClient with a short timeout (~5 seconds) and Polly for automatic retries had non-intuitive behavior when the API is under load, since IIS/Kestrel were keeping the async operations in-flight. I would suggest that this be officially documented.
Location: ASP.NET Core (3.1) / Advanced
Abstract/Outline: a shortened version of the above article, with perhaps links or details on the CancellationToken parameter binding. The article also uses an older version of exception filtering that could be updated to 3.1's IExceptionFilter
Created from #17205
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: e24f48f8-6c4d-ecda-6ce6-a7826d396e99
* Version Independent ID: 9c4af557-8d06-4c6c-ad2a-0dd234547563
* Content: [Model Binding in ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/mvc/models/model-binding?view=aspnetcore-3.1)
* Content Source: [aspnetcore/mvc/models/model-binding.md](https://github.com/dotnet/AspNetCore.Docs/blob/master/aspnetcore/mvc/models/model-binding.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-mvc**
* GitHub Login: @Rick-Anderson
* Microsoft Alias: **riande**
Contributor guide
Assessment
This issue has not been assessed yet.