1
  1. I have created a generic asp.net handler to stream a file and it hosted in IIS
  2. Then an windows form application which download the file from the handler.

Then I got error when I was trying to download the 3rd file .

What could cause this problem ?

here is the full stack trace:-

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& operation)

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

   at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& 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& msgData, Int32 type)
Saiket
  • 11
  • 1
  • 4
  • Well found the solution myself , there is place in the code where i need to set the connecting limit. as .NET only support 2 connection by default (http://stackoverflow.com/questions/460815/httpwebrequests-failing-on-subsequent-calls) causes the problem which is solved by request.ServicePoint.ConnectionLimit = 100; – Saiket Jun 24 '16 at 12:03

0 Answers0