Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ToListAsync seems to throw TaskCanceledException with different CancellationToken

Brecht YpermanApr 25 2025 — edited Apr 25 2025

I have a Blazor application that uses ToListAsync from a Virtualize component.

I get constant TaskCanceledExceptions, seemingly because the cancellationToken on the exception is not the same as the one issued by the request. (aspnetcore/src/Components/Web/src/Virtualization/Virtualize.cs at main · dotnet/aspnetcore line 435)

blazor.web.js:1  [2025-04-25T11:50:49.662Z] Error: System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize`1.BuildRenderTree(RenderTreeBuilder builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)

I tried replicating this and I get similar behavior

OracleEFBlazorExample/ at master · brecht-yperman-uz/OracleEFBlazorExample

Am I doing something wrong?

Comments
Post Details
Added on Apr 25 2025
3 comments
240 views