2011-09-07 3 views
4

MaxReceivedMessageSize를 2147483647로 늘렸지 만 여전히이 오류가 발생합니다. 나는 서버 설정과 클라이언트 설정에 같은 값을 넣었다.수신 메시지의 최대 메시지 크기 할당량을 초과했습니다. 예외

즉, : : 당신이 당신의 설정 파일의 <binding> 섹션의 값을 설정 한 경우

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. 

Server stack trace: 
    at System.ServiceModel.Channels.HttpInput.ThrowMaxReceivedMessageSizeExceeded() 
    at System.ServiceModel.Channels.HttpInput.GetMessageBuffer() 
    at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream) 
    at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception& requestException) 
    at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) 
    at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) 
    at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) 
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) 
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) 
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 

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) 
    at IService1.GetRecordsforMAR(Int32 showDeleted) 
    at Service1Client.GetRecordsforMAR(Int32 showDeleted) 

Inner Exception: 
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. 
+0

여전히 하한값으로 오류가 발생하기 때문에 올바른 위치의 값을 변경하지 않을 것입니다 : "... 적절한 바인딩 요소에서." –

+0

클라이언트 및 서버 설정 파일의 값을 변경했습니다. 나는 다른 곳에서 그것을 바꿀 필요가 있는지 확신하지 못한다. 나는 WCF를 처음 보았습니다. –

+0

도움이 더 필요하면 xml을 게시해야합니다. – ErnieL

답변

4

을 helpppp하십시오, 당신은 당신이 <endpoint> 요소의 bindingConfiguration 속성에 그 바인딩을 참조 확인해야

<bindings> 
    <wsHttpBinding> 
     <binding name="MyWsHttpBinding" /> 
     <!-- Other values for this binding ommitted for purposes of demonstration --> 
    </wsHttpBinding> 
</bindings> 

<services> 
    <service name=MyService"> 
     <endpoint address="" binding="wsHttpBinding" bindingConfiguration="MyWsHttpBinding" contract="IMyContract" /> 
    <service> 
</services> 

는 분명히 이것은 단지 <endpoint> bindingConfiguration 특성과 <binding> 이름 attri 사이의 관계를 시각적 데모의 완전한 설정 파일이 아닙니다 bute. 이를 설정하지 않으면 WCF는 기본값을 사용하여 바인딩을 제공합니다.

+0

고마워, 그 변경 사항을 서버와 클라이언트 모두에 적용하여 작동하도록해야한다고 덧붙이고 싶습니다 (이러한 설정은 maxBufferPoolSize 및 maxReceivedMessageSize입니다). – Anvar

관련 문제