我如何...我们如何处理sharepoint的阈值限制? [英] How do i...how can we handle threshold limit of sharepoint?

查看:105
本文介绍了我如何...我们如何处理sharepoint的阈值限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SharePoint在列表或库中配置了默认阈值限制为5000个项目。这意味着,如果列表或库中的项目超过该数量,则任何视图,分组和查询都将失败,因此有哪些解决方案/解决方案可以通过API处理此问题的SharePoint?为什么SharePoint设置了这样的规则?



我尝试过:



SharePoint is configured with a default threshold limit of 5000 items in a list or library. This means that if the items in a list or library exceed that number, any views, grouping and queries will fail, So there is any work-around/solution to handle this issue of SharePoint by API? and Why SharePoint set such a rule?

What I have tried:

spContext.Credentials =
                  new SharePointOnlineCredentials(
                      ConfigurationManager.AppSettings[ConfigurationConstants.SharePointUserName],
                      SharePointHelper.GetSecureString());

              // Add our User Agent information
              spContext.ExecutingWebRequest += delegate (object sender, WebRequestEventArgs e)
              {
                  e.WebRequestExecutor.WebRequest.UserAgent = "NONISV|Contoso|GovernanceCheck/1.0";
              };

推荐答案

您实施的解决方案是避免请求限制。您的解决方案(理论上)将允许您在相同的时间内提出更多请求。



我认为您正在寻找的是一种克服5000项限制的方法查询列表或库时。以下链接包含完整示例,还包含ContentIterator的SharePoint Online兼容版本,该版本专门用于处理大量列表项:

主数据库中的PnP / Samples / Core.ListViewThreshold·SharePoint / PnP·GitHub [ ^ ]
The solution you have implemented is to avoid request throttling. Your solution will (theoretically) allow you to make more requests in the same amount of time.

I think what you are looking is a way to overcome the 5000 item limit when querying a list or library. The following link has a complete sample and also contains a SharePoint Online compatible version of the ContentIterator, which is specially made to handle large amounts of list items:
PnP/Samples/Core.ListViewThreshold at master · SharePoint/PnP · GitHub[^]


这篇关于我如何...我们如何处理sharepoint的阈值限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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