System.Runtime.Remoting.RemotingException: Failed to read from an IPC Port: The pipe has been ended
<ol>
<li>I have created a generic asp.net handler to stream a file and it hosted in IIS </li>
<li>Then an windows form application which download the file from the handler.</li>
</ol>

<p>Then I got error when I was trying to download the 3rd file .</p>

<p>What could cause this problem ? </p>

<p>here is the full stack trace:-</p>

<pre><code>System.Runtime.Remoting.RemotingException: Failed to read from an IPC Port: The pipe has been ended.


Server stack trace: 

   at System.Runtime.Remoting.Channels.Ipc.IpcPort.Read(Byte[] data, Int32 offset, Int32 length)

   at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[] buffer, Int32 offset, Int32 count)

   at System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer, Int32 offset, Int32 count)

   at System.Runtime.Remoting.Channels.SocketHandler.ReadAndMatchFourBytes(Byte[] buffer)

   at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadAndMatchPreamble()

   at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadVersionAndOperation(UInt16&amp; operation)

   at System.Runtime.Remoting.Channels.Ipc.IpcClientHandler.ReadHeaders()

   at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders&amp; responseHeaders, Stream&amp; responseStream)

   at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)



Exception rethrown at [0]: 

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
</code></pre>