【发布时间】:2011-07-25 05:00:13
【问题描述】:
我的解决方案是 Silverlight,它使用 WCF RIA 服务 SP1 和实体框架 4。
我在加载大尺寸数据时遇到问题。
我收到此错误消息。
System.ServiceModel.DomainServices.Client.DomainException:超时已过期。在操作完成之前超时时间已过或服务器没有响应。
我认为这是超时的问题,所以我尝试了下面的代码。它在我没有安装 WCF Ria 服务“SP1”时工作。 但是自从我安装了“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);
我该怎么办?
【问题讨论】:
标签: entity-framework-4 timeout wcf-ria-services