Silverlight – WCF – MaxItemsInObjectGraph [英] Silverlight – WCF – MaxItemsInObjectGraph

查看:69
本文介绍了Silverlight – WCF – MaxItemsInObjectGraph的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Silverlight LOB应用程序,正在尝试从存储过程中返回数据行,该存储过程将返回2500行.当我将其设置为选择前2000个"一切正常,但是当我将限制提高到2500时,我得到了错误 下面.但是,解决此问题后,我将删除顶部"子句,我们有时会返回100000多行.下面是错误消息,下面是配置文件.我到处都设置了max ...属性 我可以使用编辑WCF配置"工具来查找.直接从和SqlDataReader将数据作为对象数组返回.
谢谢.

I have a Silverlight LOB app and am trying to return rows of data from a stored procedure that’s returning 2500 rows.  When I set it to “select top 2000…” everything works OK, but when I raise the limit to 2500 I get the error below.  However, after resolving this issue, I will remove the ‘top’ clause and we will return over 100000 rows at times.  Below is the error message and below that is the config file.  I’ve set the max ... attribute everywhere I can find using the Edit WCF Configuration tool.  The data is being returned as an object array straight from and SqlDataReader.
Thanks.

<<

尝试序列化参数:PriceMatrix_MaxRowsTESTObjectArrayResult时发生错误. InnerException消息是在对象图中可以序列化或反序列化的最大项目数为'65536'.更改对象图或增加 MaxItemsInObjectGraph配额. '.有关更多详细信息,请参见InnerException.
>>

There was an error while trying to serialize parameter :PriceMatrix_MaxRowsTESTObjectArrayResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota. '.  Please see InnerException for more details.
>>

<?xml version="1.0"?>

<!--
 For more information on how to configure your ASP.NET application, please visit
 http://go.microsoft.com/fwlink/?LinkId=169433
 -->

<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>

  <system.serviceModel>
    <diagnostics>
      <messageLogging logEntireMessage="true" logKnownPii="true" logMalformedMessages="true"
        logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
    </diagnostics>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
   
    <bindings>
      <basicHttpBinding>
        <binding name="WarpVelocityV01.Web.WebServices.CustomerService.customBinding0"
          maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxArrayLength="1000000" />
          <security mode="None" />
        </binding>
      </basicHttpBinding>
      <customBinding>
        <binding name="WarpVelocityV01.Web.WebServices.CustomerService.customBinding0">
          <binaryMessageEncoding maxSessionSize="1000000">
            <readerQuotas maxStringContentLength="1000000" maxArrayLength="1000000" />
          </binaryMessageEncoding>
          <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
        </binding>
        <binding name="WarpVelocityV01.Web.WebServices.CompanyService.customBinding0">
          <binaryMessageEncoding maxSessionSize="1000000">
            <readerQuotas maxStringContentLength="1000000" maxArrayLength="1000000" />
          </binaryMessageEncoding>
          <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
        </binding>
      </customBinding>
    </bindings>
   
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
      multipleSiteBindingsEnabled="true" />
   
    <services>
      <service name="WarpVelocityV01.Web.WebServices.CompanyService">
        <endpoint address="" binding="customBinding" bindingConfiguration="WarpVelocityV01.Web.WebServices.CompanyService.customBinding0"
          contract="WarpVelocityV01.Web.WebServices.CompanyService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
  </system.serviceModel>


 <system.diagnostics>
  <sources>
   <source name="System.ServiceModel"  switchValue="Information, ActivityTracing" propagateActivity="true">
    <listeners>
     <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="D:\nwis\Apps\WarpVelocityV01\WarpVelocityV01\WarpVelocityV01.Web\WarpVelocityV01.svclog" />
    </listeners>
   </source>
  </sources>
 </system.diagnostics>
</configuration>


 


 

 

推荐答案

我认为这更像是WCF问题.这是WPF论坛,其中Silverlight和WCF问题被认为是题外话.我将帮助将此帖子移到WCF论坛上,以寻求更好的帮助.

I think this is more like a WCF issue. This is the WPF forum where Silverlight and WCF questions are considered off-topic. I'll help move this post the the WCF forum for better help.

此外,我碰巧发现此线程似乎与您的线程存在相同的问题.您可能需要查看该线程中标记的答案: MaxItemsInObjectGraph

Besides, I happen to found this thread which seems to have the same problem as yours. You might want to take a look at the marked answer in that thread: MaxItemsInObjectGraph

致谢,

在论坛中 MSDN订阅者支持 如果您对我们的支持有任何反馈,请联系 msdnmg@microsoft.com

Regards,
Jie
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com


这篇关于Silverlight – WCF – MaxItemsInObjectGraph的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆