簡體   English   中英

SharePoint 2010 WCF服務MaxItemsInObjectGraph問題

[英]SharePoint 2010 WCF Service MaxItemsInObjectGraph problem

部署到SharePoint 2010的自定義WCF服務遇到了問題。嘗試將某些數據導入客戶端時,出現以下錯誤:

'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. '. 

我試圖使用http://shaunedonohue.blogspot.com/2011/03/reader-quotas-for-wcf-services-in_4706.html上概述的機制進行一些更改,但我仍然收到此錯誤-這些配額設置似乎與MaxItemsInObjectGraph設置無關。 在服務的ServiceBehaviour屬性中更改此設置似乎也不起作用。

有人遇到過這個問題嗎?

通過執行“ 如何修復MaxItemsInObjectGraph錯誤?”中概述的步驟,我能夠解決此問題 ,以及Shaune博客中的信息。 也就是說:

  • WCF ServiceBehavior屬性要求將MaxItemsInObjectGraph設置如下:

     [ServiceBehavior(Namespace = "http://www.mydomain.net/MyApp/SharePoint", Name = "MySharePoint2010Service", MaxItemsInObjectGraph = 65536000)] 
  • 在創建通道之前,需要更新客戶端以更改上述問題中概述的序列化行為。

我以前找不到其他人在SharePoint 2010中遇到過此問題,但希望這會在將來對某人有所幫助。 SharePoint的動態配置不夠全面,無法涵蓋所有​​WCF設置,但是仍然首選手動更新整個服務器場中的web.config文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM