读取MTOM数据时超出了最大缓冲区大小 [英] The maximum buffer size has been exceeded while reading MTOM data

查看:107
本文介绍了读取MTOM数据时超出了最大缓冲区大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have to consume an external web service, but I'm getting the following error:

读取MTOM数据时超出了最大缓冲区大小(65536)

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

在今天之前,我使用以下配置使用相同的服务:

Before today, I was consuming the same service using the following configuration:

    <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:

I tried to increase the MaxReceivedMessageSize by adding the following tags to the customBinding tag and the children of it:

MaxReceivedMessageSize="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647" maxBufferSize="2147483647"

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

How do I have to configure my endpoint to get reponse properly?

谢谢

推荐答案

我如下更改了配置:

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

现在一切正常.

这篇关于读取MTOM数据时超出了最大缓冲区大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆