返回的数据长度超过
绑定属性。
<binding name="DefaultSoap" allowCookies="true" maxReceivedMessageSize="2147483647">
<security mode="Transport" />
</binding>
或者直接在soap客户端构造函数中:
using (soapClient = new DefaultSoapClient(new BasicHttpBinding()
{
AllowCookies = true,
Name = "DefaultSoap",
MaxBufferSize = 2147483647,
MaxReceivedMessageSize = 2147483647,
Security = new BasicHttpSecurity() { Mode = BasicHttpSecurityMode.Transport }
},
new EndpointAddress(url)))
{
}
在webservice调用中,还可以指定返回行为:
ReturnBehavior = ReturnBehavior.None