Return large data from WCF Service to ASP.NET Web Service -
So we have a console-based WCF service and ASP.NET Web service (on IIS). After some difficult operation, the WCF service will have to return some (large) data to the ASP.NET Web Service for the next processing. I tested on small results and everything is fine. But after testing the actual data, 4.5 MB has a serialized result object, an error occurs on the ASP.NET web service, which is the client's WCF-Client-Server communication.
This is an error I found:
Socket connection was aborted. This can be caused by an error in processing your message or may be received by a remote host, or a timeout that receives more than an underlying network resource problem. Local socket timeout was '04: 00: 00 'internal exception: socket expansion: "The current connection was forcibly closed by remote host" ErrorCode = 10054
Message size next binding (server) And on the client):
Net TCP binding netTcpBinding = New NetTcpBinding (); NetTcpBinding.TransactionFlow = True; NetTcpBinding.SendTimeout = New Timespace (0, 4,0, 0); NetTcpBinding.Security.Mode = SecurityMode.None; NetTcpBinding.Security.Message.ClientCredentialType = Type Message CredentialsNo; NetTcpBinding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None; NetTcpBinding.Security.Transport.ProtectionLevel = ProtectionLevel.None; NetTcpBinding.MaxReceivedMessageSize = 2147483647; NetTcpBinding.MaxBufferSize = 2147483647; NetTcpBinding.MaxBufferPoolSize = 0; NetTcpBinding.ReaderQuotas.MaxStringContentLength = int.MaxValue; NetTcpBinding.ReaderQuotas.MaxArrayLength = int.MaxValue; NetTcpBinding.ReaderQuotas.MaxBytesPerRead = int.MaxValue; NetTcpBinding.ReaderQuotas.MaxDepth = 32; NetTcpBinding.ReaderQuotas.MaxNameTableCharCount = 16384;
MaxObjectsInGraph
property is configured in a config file.
What can you advise me?
Thanks for the reply.
Comments
Post a Comment