gpt4 book ai didi

.net - 读取 MTOM 数据时已超出最大缓冲区大小

转载 作者:行者123 更新时间:2023-12-03 10:53:31 24 4
gpt4 key购买 nike

我必须使用外部 Web 服务,但出现以下错误:

The maximum buffer size (65536) has been exceeded while reading MTOM data



在今天之前,我使用以下配置使用相同的服务:
    <bindings>
<basicHttpBinding>
<binding name="BOServiceSoap11Binding">
<security mode="Transport" />
</binding>
<binding name="BOServiceSoap11Binding1" />
</basicHttpBinding>
<customBinding>
<binding name="BOServiceSoap12Binding">
<mtomMessageEncoding messageVersion="Soap12" />
<httpsTransport />

</binding>
</customBinding>
</bindings>

这是我的端点:
<endpoint address="https://x.com/live-api/services/BOService.BOServiceHttpsSoap12Endpoint/"
binding="customBinding" bindingConfiguration="BOServiceSoap12Binding"
contract="xServiceReference.BOServicePortType" name="BOServiceHttpsSoap12Endpoint" />

我尝试通过将以下标签添加到 customBinding 标签及其子标签来增加 MaxReceivedMessageSize:
MaxReceivedMessageSize="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647" maxBufferSize="2147483647"

我必须如何配置我的端点才能正确获得响应?

谢谢,

最佳答案

我改变了我的配置如下:

  <customBinding>
<binding name="BOServiceSoap12Binding">
<mtomMessageEncoding messageVersion="Soap12" maxBufferSize="2147483647"/>
<httpsTransport maxReceivedMessageSize="2147483647"/>
</binding>
</customBinding>

现在一切都按预期工作。

关于.net - 读取 MTOM 数据时已超出最大缓冲区大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25302855/

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