【发布时间】:2012-01-13 12:43:33
【问题描述】:
我的 WCF 服务被 Silverlight 应用程序用于检索数据。我没问题,
[OperationContract]
MyCollectionClass GetList(int sessID, string name);
[CollectionDataContract]
public class MyCollectionClass : List<MyClass>{ }
[DataContract]
public class MyClass {
[DataMember]
public string Prop1 { get; set; }
[DataMember]
public string Prop2 { get; set; }
}
但是.. 当 MyCollectionClass 的“记录”少于 3000 条时,它会起作用。当记录数较多时,WCF 服务似乎可以工作,但在 Silverlight 应用程序的已完成事件上发生异常:“未找到服务”。
我发现这可能与服务配置有关,我已经尝试使用两者:
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647"
关于 WCF 和客户端配置。还添加了:
readerQuotas:
maxArrayLength="2000000"
maxStringContentLength="2000000"/>
(也更改了找到的值)但似乎不起作用。
我认为问题在于消息超出了每个“消息”的最大字节数,但我不明白为什么数据没有跨越不同的消息。
任何提示表示赞赏。
乔治
【问题讨论】:
标签: wcf silverlight web-services