title: WCF async call runs synchronously instead
body: <p>I'm practicing WCF Async calls, yet I can't get it to run async.</p>
  
  <p>The code is very simple</p>
  
  <pre><code>protected void btnGetEvals_Click(object sender, EventArgs e)
  {
      EvalServiceClient client = new EvalServiceClient("BasicHttpBinding_IEvalService");
      client.GetEvalsCompleted += client_GetEvalsCompleted;
      client.GetEvalsAsync();
      Label1.Text = "Waiting...";
      //client.Close();
  }
  
  void client_GetEvalsCompleted(object sender, GetEvalsCompletedEventArgs e)
  {
      GridView1.DataSource = e.Result;
      GridView1.DataBind();             
  }
  </code></pre>
  
  <p>And here's the service</p>
  
  <pre><code>public class EvalService : IEvalService
  {
      List&lt;Eval&gt; evals = new List&lt;Eval&gt;();
  
      public void SubmitEval(Eval eval)
      {
          evals.Add(eval);
      }
  
      public List&lt;Eval&gt; GetEvals()
      {
          Thread.Sleep(5000);
          return evals;
      }
  }
  </code></pre>
  
  <p>When I click btnGetEvals, I should see "Waiting..." immediately while the service executes and returns evals. Instead, both take 5 seconds, and evals with "Waiting..." appear at the same time.</p>
  
  <p>I found <a href="http://social.msdn.microsoft.com/Forums/vstudio/en-US/20b2e236-b43c-431b-a51e-24c5250b64cf/wcf-async-call-not-working" rel="nofollow">this</a>, which suggests closing the client in the completed callback, so for now I just commented it out (because I don't know how to close it in the completed callback. Any help in that department would also be appreciated). Well, that didn't help. And yes my service references are already set to allow ansync operations.</p>
  
  <p>I'm a bit at a loss here. Any suggestions?</p>