Wcf 大数据提交更改

Wcf 大数据提交更改,wcf,service,ria,Wcf,Service,Ria,很抱歉,我的英语可能不合适 我的解决方案是Silverlight,它使用WCF RIA服务SP1 我正在尝试提交具有大字符串的更改实体 当它没有大字符串时,提交更改的结果是成功 但当它包含大字符串时,提交更改失败,并出现此错误 “远程主机已强制关闭现有连接” 我认为这是超时的问题,所以我尝试了下面的代码。但它不起作用 ChannelFactory<BatchContext.IBatchServiceContract> channel = ((WebDomain

很抱歉,我的英语可能不合适

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

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

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

但当它包含大字符串时,提交更改失败,并出现此错误

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

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

            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);
ChannelFactory channel=((WebDomainClient)this.DomainClient).ChannelFactory;
channel.Endpoint.Binding.OpenTimeout=新的时间跨度(0,30,0);
channel.Endpoint.Binding.CloseTimeout=新的时间跨度(0,30,0);
channel.Endpoint.Binding.ReceiveTimeout=新的时间跨度(0,30,0);
channel.Endpoint.Binding.SendTimeout=新的时间跨度(0,30,0);
我该怎么办


谢谢

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

我想你的问题对这个人来说可能很熟悉