title: Should I use Task.Run to wait tasks in a synchronous context?
body: <p>I have an ASPX page which I cannot convert to <code>async</code> but which uses some <code>async</code> methods in a synchronous context. The way it invokes them is like so:</p>
  
  <pre><code>public void MySyncMethod()
  {
      var myTask = Task.Run(() =&gt; _myField.DoSomethingAsync());
      myTask.Wait();
      //use myTask.Result
  }
  </code></pre>
  
  <p>Is there any difference between doing that and the following as far as <code>async/await</code> and/or blocking goes?</p>
  
  <pre><code>public void MySyncMethod()
  {
      var myTask = _myField.DoSomethingAsync(); //just get the Task direct, no Task.Run
      myTask.Wait();
      //use myTask.Result
  }
  </code></pre>
  
  <p>I <em>assume</em> a previous developer added the <code>Task.Run</code> for a reason. But I am having issues which accessing things in <code>HttpContext</code> as the work is being run on a different thread.</p>
  
  <p>Is there a reason to use <code>Task.Run</code> here?</p>