title: An error occurred while receiving the HTTP response,when returning large amount of records(about 20000 or more)
body: <p>Problem:
  I have one function which return large amount of record in terms of list, so while getting this record,following exception is thrown. The details of exception &amp; stack trace are mentioned bellow:</p>
  
  <p><strong>Exception</strong>: An error occurred while receiving the HTTP response to  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><strong>Stack Trace:</strong> 
  Server stack trace: 
         at     System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)</p>
  
  <p>at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)</p>
  
  <p>at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)</p>
  
  <p>at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)</p>
  
  <p>at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)</p>
  
  <p>at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)</p>
  
  <p>at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)</p>
  
  <p>Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)</p>
  
  <p>at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)</p>
  
  <p>As per my understanding is sort of request timeout issue.
  I have <strong><em>tried</em></strong> to set following in web.config, but didn't help.</p>
  
  <pre><code>    &lt;system.web&gt;
      &lt;httpRuntime maxRequestLength="102400" /&gt;
      &lt;/system.web&gt;
  </code></pre>
  
  <p>How to solve this issue, any work around? or any alternative to sort out? Any method/ technique that can handle large amount of data or this exception can be avoided.</p>
  
  <p>Thanks in advance!</p>