大数据提交更改

时间:2011-07-22 01:07:05

标签: wcf service ria

对不起,我的英语可能不合适。

我的解决方案是使用WCF RIA服务SP1的Silverlight。

我正在尝试提交具有大字符串的更改实体。

当它没有大字符串时,提交更改的结果就是成功。

但是当它包含大字符串时,提交更改将失败并显示此错误。

“远程主机强行关闭现有连接”

我认为这是关于超时的问题,所以我尝试了下面的代码。但它不起作用。

            ChannelFactory<BatchContext.IBatchServiceContract> channel = ((WebDomainClient<BatchContext.IBatchServiceContract>)this.DomainClient).ChannelFactory;
            channel.Endpoint.Binding.OpenTimeout = new TimeSpan(0, 30, 0);
            channel.Endpoint.Binding.CloseTimeout = new TimeSpan(0, 30, 0);
            channel.Endpoint.Binding.ReceiveTimeout = new TimeSpan(0, 30, 0);
            channel.Endpoint.Binding.SendTimeout = new TimeSpan(0, 30, 0);

我该怎么办?

谢谢!

1 个答案:

答案 0 :(得分:0)

首先,您应该知道有时您看到的异常可能不是真正的异常,特别是在WCF中,所以我建议您使用WCF Serivce Trace找出真正的异常。

我认为这个问题可能比较熟悉:wcf max message size