title: .NET MVC, Task never goes to status Done
body: <p>I try to implement long running operation handling on server without push notification.
  My project methods all are Async. All methods out of the web project await with ConfigureAwait(false)
  I have library referenced in my web that manages long running operation.
  On my initial request I have fire-and-forget for what I think can continue longer:</p>
  
  <pre><code>// my fire and forget - the task is not awaited
  longRunningOperation.RunAsync();
  
  // add my delay 
  var result = await Task.WhenAny(longRunningOperation.Task, Task.Delay(LongRunningConfiguration.Instance.InitialRequestReleaseTime)).ConfigureAwait(false);
  
  // if the task finishes the return on time, otherwise create long running handler
  if (result == longRunningOperation.Task)
  {
      // it is OK
  }
  else
  {
      Task task = Task.Run(async () =&gt;
      {
          await longRunningOperation.Task;
      });
  
      monitorTask = new ActiveMonitorTask(longRunningOperation, task)
      {
          Id = Guid.NewGuid()
      };
  
      _monitorStateSession.Add(monitorTask);
  }
  </code></pre>
  
  <p>At the moment I have only one of my operations implemented to support long-running.
  Myst of the time tasks for that operation goes to Done status. But from time to time they hang-out in WaitForActivation</p>
  
  <p>Any suggestions how to track the problem or check what can causes it?</p>
  
  <p>Regards,
  Boris</p>