Base solution for your next web application
BLACK FRIDAY
From Nov 21
To Dec 1
XXDAYS : XXHRS : XXMIN : XXSEC
SAVE UP TO$3K
Also valid for the
existing customers!
Open Closed

"a task was canceled" error when multiple requests sent to server #10329


0
rasoulshams created
  • v10.1.0
  • MVC
  • .net core

If links are clicked after pages are loaded but before api calles are fully completed (for instance, before data tables are loaded), a "task was canceled" error is raised. I have attached the error in Visual Studio. I presume this is related to AbpSession and goes all the way to the LoginViewComponent. If I comment this view component, other user related view components cause similar error if the same actions are taken (clicking links multiple times before a page or API call is fully loaded).

These actions are not carries out deliberately but sometimes, as some services are slow, the user decides to navigate somewhere else and clicks another link a few times which then causes this error and the server becomes unresponsive altogether.

Any ideas on how I can resolve this or how to approach this problem?

Regards!

Screenshot 2021-05-18 at 14.39.33.png


2 Answer(s)
  • 0
    rasoulshams created

    I added the following to the Core module Preinitialize method and the exception is gone. But my server still becomes unresponsive, i.e. timeout and nothing loads with refresh unless I restart the server (on local). On staging and production, it does work again but only after a while.

    Help please :)

  • 0
    musa.demir created

    Hi @rasoulshams

    Can you please share related part of the log file ?