大数据提交变更

发布于 2024-11-26 01:54:29 字数 758 浏览 2 评论 0原文

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

我的解决方案是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

递刀给你 2024-12-03 01:54:29

首先,你应该知道,有时你看到的异常可能不是真正的异常,特别是在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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文