我必须使用外部web服务,但我得到以下错误:
读取MTOM数据时已超过最大缓冲区大小(65536)
在今天之前,我使用以下配置使用相同的服务:
<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" />
我试图增加MaxReceivedMessageSize通过添加以下标签到customBinding标签和它的子标签:
MaxReceivedMessageSize="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647" maxBufferSize="2147483647"
我必须如何配置我的端点以正确获得响应?
谢谢,
我改变了我的配置如下:
<customBinding>
<binding name="BOServiceSoap12Binding">
<mtomMessageEncoding messageVersion="Soap12" maxBufferSize="2147483647"/>
<httpsTransport maxReceivedMessageSize="2147483647"/>
</binding>
</customBinding>
一切正常