简体   繁体   English

SharePoint 2010 WCF服务MaxItemsInObjectGraph问题

[英]SharePoint 2010 WCF Service MaxItemsInObjectGraph problem

I have been encountering issues with a custom WCF service deployed to SharePoint 2010. I'm receiving the following error when trying to import some data into the client: 部署到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. '. 

I have attempted to make a number of changes using the mechanism outlined on http://shaunedonohue.blogspot.com/2011/03/reader-quotas-for-wcf-services-in_4706.html , but I am still receiving this error - these quota settings do not seem to have bearing on the MaxItemsInObjectGraph setting. 我试图使用http://shaunedonohue.blogspot.com/2011/03/reader-quotas-for-wcf-services-in_4706.html上概述的机制进行一些更改,但我仍然收到此错误-这些配额设置似乎与MaxItemsInObjectGraph设置无关。 Changing this setting in the ServiceBehaviour attribute of the service does not seem to work either. 在服务的ServiceBehaviour属性中更改此设置似乎也不起作用。

Has anyone encountered this issue before? 有人遇到过这个问题吗?

I was able to resolve this issue by following the steps outlined in How to fix MaxItemsInObjectGraph error? 通过执行“ 如何修复MaxItemsInObjectGraph错误?”中概述的步骤,我能够解决此问题 , in addition to the information from Shaune's blog. ,以及Shaune博客中的信息。 That is to say: 也就是说:

  • The WCF ServiceBehavior attribute required the MaxItemsInObjectGraph to be set as follows: WCF ServiceBehavior属性要求将MaxItemsInObjectGraph设置如下:

     [ServiceBehavior(Namespace = "http://www.mydomain.net/MyApp/SharePoint", Name = "MySharePoint2010Service", MaxItemsInObjectGraph = 65536000)] 
  • The client needed to be updated to change the serialization behaviour as outlined in the above issue, before the channel was created. 在创建通道之前,需要更新客户端以更改上述问题中概述的序列化行为。

I have not been able to find anyone else who has encountered this issue with SharePoint 2010 before, but hopefully this should help someone out in the future. 我以前找不到其他人在SharePoint 2010中遇到过此问题,但希望这会在将来对某人有所帮助。 SharePoint's dynamic configuration is not quite comprehensive enough to cover all WCF settings, but it is still much preferred to manually updating web.config files throughout the farm. SharePoint的动态配置不够全面,无法涵盖所有​​WCF设置,但是仍然首选手动更新整个服务器场中的web.config文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM