I have a SP I call that takes 1 or 2 minutes to run.
I am running into the error:
system threading taskcanceledexception a task was canceled
atm the SP takes 1:08 to run.
At 35 seconds, using filters to get less data back, it runs fine!
We have many reports that take a bit to run.
How to I get this task thing to stop killing my app.
Browser.
It says something has happened, reload.
Doing the Inspection thing I see a System.Threading.Tasks.TaskCanceledException
as the first error.
Appears to be timing out somewhere.
I know the data from the SQL server is back from stepping thru the code.
It appears I was calling the routine incorrectly!
What I had:
await getData_ProdResultRtp3(strWhoIAm);
What now seems to work:
await Task.Run(() => DoLongSyncOperation());
Not sure what the difference is between those two?
I assume, I know! :(, the 2nd one force it to wait till that routine is done?
sorry:
await Task.Run(() => getData_ProdResultRtp3(strWhoIAm));
for the 2nd cmd.