ASP.NET Controller: An asynchronous module or handler completed while an asynchronous operation was still pending

后端 未结 8 1163
一个人的身影
一个人的身影 2020-11-28 09:36

I have a very simple ASP.NET MVC 4 controller:

public class HomeController : Controller
{
    private const string MY_URL = \"http://smthing\";
    private r         


        
8条回答
  •  再見小時候
    2020-11-28 10:13

    Method return async Task, and ConfigureAwait(false) can be one of the solution. It will act like async void and not continue with the sync context (As long as you really don't concern the end result of the method)

提交回复
热议问题