title: WCF -An error occurred while receiving the HTTP response
body: <p>I try to get list from service like this:</p>
  
  <pre><code>   static void Main(string[] args)
      {
        MyClient proxy = new MyClient();
        List&lt;X&gt; l = proxy.Func(1).ToList();
      }
  </code></pre>
  
  <p>X is class from DLL of entity framework project.</p>
  
  <p>My function in service look like this:</p>
  
  <pre><code>    public List&lt;X&gt; Func(int NUM)
      {                      
          ProjectContext MyContext = new ProjectContext();
          s = MyContext.X.ToList();
          return s;
  
      }
  </code></pre>
  
  <p>My context define like this:</p>
  
  <pre><code>public class ProjectContext : DbContext
  {
  
      public ProjectContext ()
          : base("name=ApplicationServices")
      {
          this.Configuration.ProxyCreationEnabled=false;
          this.Configuration.LazyLoadingEnabled = false;
      }
  
      public DbSet&lt;XX&gt; X{ get; set; }
  
  }
  </code></pre>
  
  <p>I get error: </p>
  
  <p>An error occurred while receiving the HTTP response to XXX. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.</p>