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

后端 未结 8 1166
一个人的身影
一个人的身影 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:18

    I ran into related issue. A client is using an Interface that returns Task and is implemented with async.

    In Visual Studio 2015, the client method which is async and which does not use the await keyword when invoking the method receives no warning or error, the code compiles cleanly. A race condition is promoted to production.

提交回复
热议问题