gpt4 book ai didi

c# maxreceivedmessagesize 不工作

转载 作者:行者123 更新时间:2023-11-30 16:42:50 28 4
gpt4 key购买 nike

我在项目中引用了这个外源服务,调用它时出现以下错误:

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

所以我在网络配置中修复了我的绑定(bind),如下所示:

<client>
<endpoint address="MY SERVICE ADDRESS"
binding="basicHttpBinding" bindingConfiguration="MyBinding"
contract="MyContract" name="MyImplPort" />
</client>

在绑定(bind)中:

<bindings>
<basicHttpBinding>
<binding name="MyBinding" maxBufferPoolSize="2000000000"
maxBufferSize="2000000000" maxReceivedMessageSize="2000000000"/>
</basicHttpBinding>
</bindings>

但是我仍然得到同样的错误。
有办法解决这个问题吗?

最佳答案

你有没有增加你的readerQuotas ??

readerQuotas 定义了对 SOAP 消息复杂性的约束,这些消息可以由配置有绑定(bind)的端点处理。

像这样:

<binding name="MyBinding" maxBufferPoolSize="2000000000"
maxBufferSize="2000000000" maxReceivedMessageSize="2000000000">
<readerQuotas maxDepth="32"
maxArrayLength="200000000"
maxStringContentLength="200000000"/>
</binding>

关于c# maxreceivedmessagesize 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45894799/

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