title: An error occurred while receiving the HTTP response to wcfservice.svc. This could be due to the service endpoint binding not using the HTTP protocol
body: <p>I have a wcf service deployed under IIS 6.0. The service method accepts a list of objects and return the same list. </p>
  
  <pre><code>    List&lt;CustomObject&gt; ProcessImageData(List&lt;CustomObject&gt; lstData)
  </code></pre>
  
  <p>The object may contain large amount of html data. The service currently takes hardly a few seconds to fulfill the request but I am getting a tons of following 2 exceptions. </p>
  
  <p>"The request channel timed out while waiting for a reply after 00:00:59.9989999. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."</p>
  
  <p>"An error occurred while receiving the HTTP response to <a href="http://MyService.svc" rel="nofollow">http://MyService.svc</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."</p>
  
  <p>Here is how my config files looks like.</p>
  
  <h2>web.Config (service) file</h2>
  
  <pre><code>    &lt;service behaviorConfiguration="WcfServices.Service1Behavior" name="WcfServices.HtmlToImageService"&gt;
      &lt;endpoint address="" binding="wsHttpBinding" bindingConfiguration="LargeSizeMessages" contract="WcfServices.IHtmlToPngService"&gt;
        &lt;identity&gt;
          &lt;dns value="localhost"/&gt;
        &lt;/identity&gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt;
     &lt;/service&gt;
  
      &lt;behaviors&gt;
      &lt;serviceBehaviors&gt;
      &lt;behavior name="WcfServices.Service1Behavior"&gt;
        &lt;serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000" maxConcurrentInstances="1000"/&gt;
        &lt;serviceMetadata httpGetEnabled="true"/&gt;
        &lt;dataContractSerializer maxItemsInObjectGraph="6553500"/&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
      &lt;/behavior&gt;
     &lt;/behaviors&gt;
      &lt;wsHttpBinding&gt;
  
         &lt;binding name="LargeSizeMessages"
               maxBufferPoolSize="2147483647"
               maxReceivedMessageSize="2147483647"&gt;
        &lt;readerQuotas
         maxDepth="32"
         maxStringContentLength="2147483647"
         maxArrayLength="2147483647"
         maxBytesPerRead="4096"
         maxNameTableCharCount="16384" /&gt;
      &lt;/binding&gt;
    &lt;/wsHttpBinding&gt;
  </code></pre>
  
  <h2>Client Config file</h2>
  
  <pre><code>    &lt;wsHttpBinding&gt;
        &lt;binding name="WSHttpBinding_IHtmlToImageService" closeTimeout="00:10:00"
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
        bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
        maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
        messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
        allowCookies="false"&gt;
        &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647"
          maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
        &lt;reliableSession ordered="true" inactivityTimeout="00:10:00"
          enabled="false" /&gt;
        &lt;security mode="Message"&gt;
          &lt;transport clientCredentialType="Windows" proxyCredentialType="None"
            realm="" /&gt;
          &lt;message clientCredentialType="Windows" negotiateServiceCredential="true"
            algorithmSuite="Default" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
      &lt;/wsHttpBinding&gt;
  </code></pre>
  
  <p>One of the exceptions propose to increase the sendTimeout vakue which is currently set to 1 minute. I increased it but it didn't seem to improve anything and I still get these exceptions. </p>
  
  <p>Question:
  Why am I getting these exceptions and what can I change to prevent this ?</p>
  
  <p>Also, Here is an exception which is logged into Event Log on IIS server.</p>
  
  <p>Exception Type: System.ArgumentException
  Message: Parameter is not valid.
  ParamName: NULL
  Data: System.Collections.ListDictionaryInternal
  TargetSite: Void .ctor(Int32, Int32, System.Drawing.Imaging.PixelFormat)
  HelpLink: NULL
  Source: System.Drawing</p>
  
  <p>StackTrace Information</p>
  
  <hr>
  
  <p>at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
     at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
     at WcfService.CreateBitmap(WebBrowser&amp; browser) in C:_tfs\ImagingSystem\Development\Dev\Source\Wcf\WcfServices\HtmlToPngService\HtmlToPngService.svc.cs:line 126</p>