title: System.ServiceModel.CommunicationException: 'An error occurred while receiving the HTTP
body: <p>I have this error in my client.
  System.ServiceModel.CommunicationException: 'An error occurred while receiving the HTTP response to <a href="http://localhost:8099/IService" rel="nofollow noreferrer">http://localhost:8099/IService</a>. 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.'
  client config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /&gt;
    &lt;/startup&gt;
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="BasicHttpBinding_IProgrammService" /&gt;
        &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
        &lt;endpoint address="http://localhost:8099/IService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IProgrammService" contract="ServiceReferenceMrChicken.IProgrammService" name="BasicHttpBinding_IProgrammService" /&gt;
      &lt;/client&gt;
    &lt;/system.serviceModel&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
        &lt;parameters&gt;
          &lt;parameter value="v14.0" /&gt;
        &lt;/parameters&gt;
      &lt;/defaultConnectionFactory&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
    &lt;connectionStrings&gt;
      &lt;add name="EmployeeConnection" connectionString="Data Source=den1.mssql7.gear.host;Initial Catalog=mrchikendb;User ID=mrchikendb;Password=Qwer-12" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  
  </code></pre>
  
  <p>server config </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /&gt;
    &lt;/startup&gt;
    &lt;system.serviceModel&gt;
      &lt;bindings /&gt;
      &lt;client /&gt;
      &lt;services&gt;
        &lt;service name="IService.ProgrammService" behaviorConfiguration="mexBehavior"&gt;
          &lt;endpoint address="IService" binding="basicHttpBinding" contract="IService.IProgrammService"&gt;&lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"&gt;&lt;/endpoint&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="http://localhost:8099/" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="mexBehavior"&gt;
            &lt;dataContractSerializer maxItemsInObjectGraph="2147483646"/&gt;
            &lt;serviceThrottling maxConcurrentCalls="120" maxConcurrentSessions="120"
                               maxConcurrentInstances="120" /&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
    &lt;/system.serviceModel&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
        &lt;parameters&gt;
          &lt;parameter value="v14.0" /&gt;
        &lt;/parameters&gt;
      &lt;/defaultConnectionFactory&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
    &lt;connectionStrings&gt;
      &lt;add name="EmployeeConnection" connectionString="Data Source=den1.mssql7.gear.host;Initial Catalog=mrchikendb;User ID=mrchikendb;Password=Qwer-12" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;system.diagnostics&gt;
      &lt;sources&gt;
        &lt;source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true"&gt;
          &lt;listeners&gt;
            &lt;add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\TracesServ_ce.svclog" /&gt;
          &lt;/listeners&gt;
        &lt;/source&gt;
      &lt;/sources&gt;
    &lt;/system.diagnostics&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>code where i gave my exception</p>
  
  <pre><code>ServiceReferenceMrChicken.ProgrammServiceClient client = new ServiceReferenceMrChicken.ProgrammServiceClient();
              var users = client.GetUsers();
              dataGrid.ItemsSource = users;
  </code></pre>
  
  <p>code where i gave my exception</p>
  
  <pre><code>ServiceReferenceMrChicken.ProgrammServiceClient client = new ServiceReferenceMrChicken.ProgrammServiceClient();
              var users = client.GetUsers();
              dataGrid.ItemsSource = users;
  </code></pre>