“System.ServiceModel.DomainServices.Client.DomainOperationException:查询"XXX"load操作失败,远程服务器返回了错误:NoFound.……”解决方法

原因:

在Silverlight+WCF RIA Service或者WCF Service的架构中,经常会遇到WCF序列化65536大小限制的问题

解决方法:

修改web.config

 <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <!--设置 maxItemsInObjectGraph -->
    <services>
     <!--注意下面这个name属性,必须改成你自己的namespace+DomainService类名!! -->
     <service name="BusinessApplication1.Web.DomainService1"
                 behaviorConfiguration="MyWCFConfig" />
     </services>
     <behaviors>
        <serviceBehaviors>
          <behavior name="MyWCFConfig">
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

原文地址:https://www.cnblogs.com/ahuang1118/p/2873012.html