1

Silverlight 将 WCF 与basicHttpBinding结合使用

<basicHttpBinding>              
    <binding name="BasicHttpBinding_BugsService" 
             maxBufferSize="2147483647" 
             maxReceivedMessageSize="2147483647">                  
       <security mode="None"/>
    </binding>              
</basicHttpBinding>

我将图像作为 发送byte[],只要图像小于 20KB,它就可以工作

但是当它更大时,我得到了错误:

远程服务器返回错误:NotFound

在 Reference.cs

public bool EndSave(System.IAsyncResult result) 
{
    object[] _args = new object[0];
    bool _result = ((bool)(base.EndInvoke("Save", _args, result))); // error
    return _result;
}
4

2 回答 2

0

请在接口实现中捕获 wcf 端的异常并将其发布。

该错误可能与此问题有关:“ WCF Message Size Issue

于 2009-06-19T06:27:57.603 回答
0

检查绑定配置上的“maxReceivedMessageSize”属性(以字节为单位表示大小)。如果您的数据超过该大小,则该消息将被丢弃。

于 2009-06-19T06:28:39.270 回答