![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm working with a .NET application that uses remoting to communicate between the web layer and an application layer, and one method returns a byte array containing the contents of a file. The file sizes have been up to 40 MB previously, and were returned with now problem. However, now there are some 70 MB files, and whenever a byte array containing the contents of one of these 70 MB files is returned, the web layer client gets a Socket exception stating: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. with the following Server stack trace: at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.Connection.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.ConnectStream.InternalBeginRead(Int32 bytesToRead, NestedSingleAsyncResult castedAsyncResult, Boolean fromCallback) at System.Net.ConnectStream.BeginReadWithoutValidatio n(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.ConnectStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count) at System.IO.BinaryReader.ReadBytes(Int32 count) at System.Runtime.Serialization.Formatters.Binary.__B inaryParser.ReadArrayAsBytes(ParseRecord pr) at System.Runtime.Serialization.Formatters.Binary.__B inaryParser.ReadArray(BinaryHeaderEnum binaryHeaderEnum) at System.Runtime.Serialization.Formatters.Binary.__B inaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.Obj ectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, IMethodCallMessage methodCallMessage) at System.Runtime.Remoting.Channels.CoreChannel.Deser ializeBinaryResponseMessage(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding) at System.Runtime.Remoting.Channels.BinaryClientForma tterSink.SyncProcessMessage(IMessage msg) This would lead me to believe that this is an issue with the size of the byte array that is being returned. I've done some digging to try to find out where/if the maximum object size returned over a remoting boundary is defined, but I haven't been successful. - Is there a maximum size of a return value for a remoting interface? - This is existing legacy code, but is there a better approach to getting this file content to the web layer? Due to security/network restrictions, the web layer servers do not have direct access to the file system where these files are stored. Thanks in advance |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |