그래서 콘솔 호스팅 WCF 서비스와 ASP.NET 웹 서비스 (IIS에서)가 있습니다. 힘든 작업 후에 WCF 서비스는 다음 처리를 위해 ASP.NET 웹 서비스에 일부 (큰) 데이터를 반환해야합니다. 나는 작은 결과를 테스트했고 모든 것이 괜찮습니다. 그러나 4.5MB 근처의 직렬화 된 결과 개체 인 실제 데이터를 테스트 한 후 wcf-client-server 통신의 클라이언트 인 ASP.NET 웹 서비스에서 오류가 발생합니다.WCF 서비스에서 ASP.NET 웹 서비스로 큰 데이터 반환
이 내가 가진 오류는 다음과 같습니다
소켓 연결이 중단되었습니다. 이 메시지는 메시지가 처리 중이거나 원격 호스트가 수신 시간 초과를 초과했거나 기본 네트워크 리소스 문제로 인해 발생할 수 있습니다. 로컬 소켓 시간 초과가 '04 : 00 : 00 '입니다. 내부 예외 : SocketException이 :
NetTcpBinding netTcpBinding = new NetTcpBinding(); netTcpBinding.TransactionFlow = true; netTcpBinding.SendTimeout = new TimeSpan(0, 4,0, 0); netTcpBinding.Security.Mode = SecurityMode.None; netTcpBinding.Security.Message.ClientCredentialType = MessageCredentialType.None; 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
속성 "기존 연결이 원격 호스트에 의해 강제로 폐쇄되었다"ErrorCode가 = 10054
메시지 크기 (서버 및 클라이언트) 옆에 결합함으로써 구성된 구성 파일에 구성됩니다.
나에게 조언 해 주실 수 있습니까? 또한 클라이언트와 서버에서 프로그래밍 방식으로 MaxObjectsInGraph
속성을 설정하는 예제가 필요합니다.
답변 해 주셔서 감사합니다.