gpt4 book ai didi

wcf - 已超出传入邮件的最大邮件大小配额异常

转载 作者:行者123 更新时间:2023-12-01 01:26:42 25 4
gpt4 key购买 nike

我将 MaxReceivedMessageSize 增加到 2147483647 但我仍然收到此错误。我在服务器配置和客户端配置上设置了相同的值。请帮助ppp

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.

最佳答案

如果您在 <binding> 中设置了值配置文件的部分,您需要确保在 <endpoint> 的 bindingConfiguration 属性中引用了这些绑定(bind)。元素:

IE。,:

<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>名称属性。如果你不设置这个,WCF 会给你一个默认值的绑定(bind)。

关于wcf - 已超出传入邮件的最大邮件大小配额异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7339828/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com