【发布时间】:2010-03-18 21:59:20
【问题描述】:
我有一个 Silverlight 3.0 应用程序,它使用 WCF 服务与数据库进行通信,当我从服务方法返回大量数据时,我收到 Service Not Found 错误。我相当有信心,它的解决方案是简单地更新 maxItemsInObjectGraph 属性,但我正在以编程方式创建服务客户端并且找不到设置此属性的位置。这是我现在正在做的事情:
BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None)
{
MaxReceivedMessageSize = int.MaxValue,
MaxBufferSize = int.MaxValue
};
MyService.MyServiceServiceClient client = new MyService.MyServiceProxyServiceClient(binding, new EndpointAddress(new Uri(Application.Current.Host.Source, "../MyService.svc")));
【问题讨论】:
标签: wcf .net-3.5 silverlight-3.0 wcf-client