大数据提交变更
很抱歉我的英语可能不合适。
我的解决方案是 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);
我应该怎么办?
谢谢你!!
I'm sorry that my english might not be appropriate.
My solution is Silverlight which uses WCF RIA service SP1.
I'm trying to submit change entity which have large string.
When it doesn't have large string, submit change's result is success.
But when it contains large string, submit change fails with this error.
"An existing connection was forcibly closed by the remote host"
I thought it is problem about timeout, so I tried below code. But it doesn't work.
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);
What should I do?
Thank you!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,你应该知道,有时你看到的异常可能不是真正的异常,特别是在WCF中,所以我建议你使用WCF Serivce Trace来找出真正的异常。
我认为您的问题可能与此相似:wcf 最大消息大小。
First of all, you should know that sometimes the exception you see may not be the real exception, expecially in WCF, so I suggest you use WCF Serivce Trace to find out the real exception.
And I think your problem may be familiar to this one: wcf max message size.