如果表查询返回的内容过多,查询就会出错“Theremote server returned an error: NotFound”
后台错误:Maximum number ofitems that can be serialized or deserialized in an object graph is ‘65536’.
解决办法:调整:MaxItemsInObjectGraph,在<system.serviceModel>中指定Service和behavior
l Service的名字是:
name=”YourRiaProjectName.Web.YourDomainServiceName”
l behavior的名字是:
name=” YourRiaProjectName-Web-YourDomainServiceName”
<!--<system.serviceModel>--> <services> <service name="RIALIB.Web.DomainSVC" behaviorConfiguration="RIALIB-Web-DomainSVC"/> </services> <behaviors> <serviceBehaviors> <behavior name="RIALIB-Web-DomainSVC"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> <dataContractSerializer maxItemsInObjectGraph="655360"/> </behavior> </serviceBehaviors> </behaviors> <!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> </system.serviceModel>--> |