Cancellation Tokens in MVC or Razor Pages for NET 5 +AJAX Cancellation

preview_player
Показать описание
Cancellation Tokens in MVC and in Razor Pages for NET 5. Also covered is AJAX web request cancellation from the client side. After discussing tokens in both templates, this video then shows how to setup an ajax call to a ASP.NET MVC project (and cancel it from javascript inside cshtml).
Рекомендации по теме
Комментарии
Автор

After watching this video I highly recommend you read this article, and pay attention to the sections on deadlocks:
Also, thinking back on this video, I wanted to add: if you create a token inside of an action for example in .net framework, make sure that you are disposing of it properly, do a try-catch and dispose of that token. In my case this affected even the ajax cancellations, and created a memory leak.

DataVids