The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
오류 : 수신 메시지의 최대 메시지 크기 할당량
프록시에 값을 언급했습니다. 서버 측 WCF Web.Config에서 언급해야합니까? 그렇다면 어떻게 알 수 있습니까?
내 WCF Web.Config가 아래에 언급되어 있습니다.
<binding name="NewBinding0" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="20000000">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession enabled="true" />
<security mode="None">
<transport clientCredentialType="None" />
<message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="false" />
</security>
</binding>
내 클라이언트 측 코딩.
WSHttpBinding binding = new WSHttpBinding();
//binding.ReaderQuotas.MaxArrayLength = 10485760;
//binding.MaxReceivedMessageSize = 10485760;
binding.Security.Mode = SecurityMode.None;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows;
binding.Security.Message.EstablishSecurityContext = false;
//binding.Security.Message.NegotiateServiceCredential = true;
binding.ReliableSession.Enabled = true;
binding.ReaderQuotas.MaxArrayLength = 2147483647;
binding.ReaderQuotas.MaxDepth = 2147483647;
binding.ReaderQuotas.MaxNameTableCharCount = 2147483647;
binding.ReaderQuotas.MaxBytesPerRead = 2147483647;
binding.MaxReceivedMessageSize = 20000000;
binding.ReaderQuotas.MaxStringContentLength = 2147483647;
binding.SendTimeout = TimeSpan.FromMinutes(10);
binding.CloseTimeout = TimeSpan.FromMinutes(10);
binding.OpenTimeout = TimeSpan.FromMinutes(10);
binding.ReceiveTimeout = TimeSpan.FromMinutes(10);
//EndpointIdentity.CreateUpnIdentity("[email protected]");
ChannelFactory<IDBSyncContract> factory = new ChannelFactory<IDBSyncContract>(binding, new EndpointAddress(endPointURL));
dbProxy = factory.CreateChannel();
this.dbProxy = dbProxy as IDBSyncContract;
는이 스레드 http://stackoverflow.com/questions/884235/wcf-how-to-increase-message-size-quota – Aravind
내 서버 쪽을 참조 않았다 단순히 <보안 모드 = "없음"> <메시지 clientCredentialType = "윈도우"negotiateServiceCredential = "true"를 establishSecurityContext = "거짓"/> 나는에 대한 정확한 위치한다 side.What 서버의 속성 maxReceivedMessageSize을 언급하는 방법으로 혼란 스러워요 있는 wsHttpBinding> –
binding
요소에maxReceivedMessageSize
속성을 설정 Web.Config속성. –