<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>AdamDing</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/adamding/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/adamding/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:38:29 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Why your SharePoint list is so slow when it has more than 5,000 items with separate permissions.</title>
      <link>https://docs.microsoft.com/archive/blogs/adamding/why-your-sharepoint-list-is-so-slow-when-it-has-more-than-5000-items-with-separate-permissions</link>
      <pubDate>Fri, 20 Nov 2015 01:13:01 GMT</pubDate>
      <dc:creator><![CDATA[Ding Mingyu]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/adamding/2015/11/20/why-your-sharepoint-list-is-so-slow-when-it-has-more-than-5000-items-with-separate-permissions/</guid>
      <description><![CDATA[It has been several years, since the release of SP2013, that many people complain the "5,000 item...]]></description>
      <content:encoded><![CDATA[<p>It has been several years, since the release of SP2013, that many people complain the "5,000 item issue".</p>
<p>If you have a list with more than 5,000 items which break permission inheritance, it will be unbelievably slow. Many people think that is a bug/performance recession of the product. But it is not the truth.</p>
<p>Actually the slowness is caused by wrong setting. The setting is actually introduced as early as SP 2010, but I don't know why no one cares about it until the release of SP&nbsp;2013.</p>
<p>Since SP 2010, when it handles a list view, it would check "List View Threshold". If the list view has less items than the threshold, it uses a SQL query that is suitable for small list; while if it has more items than the threshold, it applies a different SQL query suitable for big list.</p>
<p>Moreover, there are two more settings to enable end users to view big list that exceeds the threshold, and to allow the users do such big list query in certain period of a day.</p>
<p>The problem is, if you don't set it explicitly, you will get a warning that your list has more items than threshold, and the list view won't display! For that reason, and because of the lack of documents, many admins just simply set an unrealistic huge threshold to make the list work for all users.</p>
<p>That causes the poor performance because SharePoint applies the wrong type of SQL query because of the huge Threshold.</p>
<p>I've requested a better KB published for several time, and even write one by myself. Unfortunately it is never published on TechNet or MSDN. So I copy the resolution here and hope more people can see it.</p>
<p>There are three options. You can combine the three and find the fittest for your environment. <br />Option 1: <br />Enlarge the "List View Threshold".</p>
<p>Warning: The minimum "List View Threshold" is 2000, the maximum is unlimited. The caveat is: a very big "List View Threshold" would result in very poor performance, because SharePoint would otherwise apply special optimizations on list with more items than "List View <br />Threshold". <br />"List View Threshold" can be changed either from central administrator site or by PowerShell command.</p>
<p>Change "List View <br />Threshold" from central administrator site.</p>
<p>Click the link "Manage Web Applications". <br />Highlight the web application of interest. <br />Click the triangle of "General Settings" ribbon button, in dropdown options, click "Resource Throttling". <br />Edit "List View Threshold" and click OK to save the settings.</p>
<p>Change "List View Threshold" with PowerShell.</p>
<p>$app=Get-SPWebApplication "http(s)://&lt;web app url&gt;"</p>
<p>$app.MaxItemsPerThrottledOperation=&lt;your target number, e.g. 6000&gt;</p>
<p>$app.Update()</p>
<p>Option 2: Unthrottle the Threshold in the web application level with PowerShell. <br />Warning: Below script unthrottle the threshold <br />all day long(24 hours per day). You can restrict the duration of unthrottling by setting DailyStartUnthrottledPrivilegedOperationsHour, DailyStartUnthrottledPrivilegedOperationsMinute <br />and DailyUnthrottledPrivilegedOperationsDuration value of the SPWebApplication <br />object.</p>
<p>$app=Get-SPWebApplication "http(s)://&lt;web app url&gt;"</p>
<p>$app.DailyUnthrottledPrivilegedOperationsDuration=24</p>
<p>$app.UnthrottledPrivilegedOperationWindowEnabled=$true <br />$app.Update()</p>
<p>Option 3: You can even unthrottle the Threshold in&nbsp;a certain&nbsp;List with PowerShell.</p>
<p>$web=Get-SPWeb "http(s)://&lt;site or sub-site url&gt;"</p>
<p>$list=$web.Lists["&lt;List Title or GUID&gt;"]</p>
<p>$list.EnableThrottling=$false <br />$list.Update()</p>]]></content:encoded>
    </item>
    <item>
      <title>Troubleshoot SharePoint Online with Live Examples-- (1) SiteManager.aspx page cannot open</title>
      <link>https://docs.microsoft.com/archive/blogs/adamding/troubleshoot-sharepoint-online-with-live-examples-1-sitemanager-aspx-page-cannot-open</link>
      <pubDate>Wed, 16 Sep 2015 23:29:00 GMT</pubDate>
      <dc:creator><![CDATA[Ding Mingyu]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/adamding/2015/09/16/troubleshoot-sharepoint-online-with-live-examples-1-sitemanager-aspx-page-cannot-open/</guid>
      <description><![CDATA[Like it or not, SharePoint is going more and more towards cloud. The number of users on SharePoint...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri; font-size: small;">Like it or not, SharePoint is going more and more towards cloud. The number of users on SharePoint Online has increased quickly. However, the number of available troubleshooting guidelines for SharePoint Online are inappropriately few, and the quality is poor as well. Admins are taught to just make a phone call when it doesn&rsquo;t work. Without knowing the basic steps, the experience of problem solving becomes especially painful and sometimes it leads to bad results, which should have been avoided. </span></p>
<p><span style="font-family: Calibri; font-size: small;">This series of posts are supposed to help the admins handle problems better and work with support engineers more efficiently/smoothly, by reviewing real world examples how the problems are solved. </span></p>
<p><span style="font-family: Calibri; font-size: small;">In this very first post, we will go through an error encountered in the SiteManager.aspx by a customer. </span></p>
<p><span style="font-family: Calibri; font-size: small;">In site settings page of a portal site, there is a link of &ldquo;Content and Structure&rdquo;, which refers to the SiteManager.aspx page. </span><span style="font-family: Calibri; font-size: small;">&nbsp;</span><span style="font-family: Calibri; font-size: small;">This page manages all the sub-sties/libraries/lists/folders in a site with a tree-view navigation in the left, and a content pane in the right. </span></p>
<p><span style="font-family: Calibri; font-size: small;">For this customer, the SiteManager.aspx cannot render the site contents and it displays a message like follows. </span></p>
<p style="padding-left: 30px;">Sorry, something went wrong</p>
<p style="padding-left: 30px;">An unexpected error has occurred.</p>
<p style="padding-left: 30px;"><a href="https://dingmingyu.sharepoint.com/sites/Portal/_layouts/15/sitemanager.aspx?Source=%7bWebUrl%7d_layouts/15/settings.aspx"><span style="color: #0000ff;">Technical Details</span></a></p>
<p style="padding-left: 30px;"><a title="Troubleshoot issues with Microsoft SharePoint Foundation. - Opens in new window" href="javascript:HelpWindowKey('WSSEndUser_troubleshooting')"><span style="color: #0000ff;">Troubleshoot issues with Microsoft SharePoint Foundation.</span></a></p>
<p style="padding-left: 30px;">Correlation ID: a5fc289d-a0a4-2000-22dc-0dbea4e8bc18</p>
<p style="padding-left: 30px;">Date and Time: 8/30/2015 12:58:38 AM</p>
<p><span style="font-family: Calibri; font-size: small;">Such error message is familiar to many users. However, few people realize there is important information inside it. The most important is&nbsp;the &ldquo;Correlation ID&rdquo;. SharePoint is a sophisticated software which writes very detail logs for each user operation. The &ldquo;Correlation ID&rdquo; is the unique id for your specific page request, and is the key to find the relevant logs among billions of lines of other log entries. </span></p>
<p><span style="font-family: Calibri; font-size: small;">So the very first thing the admin can do when reporting an error, is to provide the Correlation ID. Because the huge amount of log entries generated each minute, the logs won&rsquo;t be kept for long. So the admin needs to provide the Correlation ID in time, best in one day. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Now I will explain a little bit what the Microsoft Support does behind the scene. </span></p>
<p><span style="font-family: Calibri; font-size: small;">After retrieving the logs of the Correlation ID, the support needs to scrutinize the logs for useful information. Below is the one with the exact error message and CallStack. </span></p>
<p><em>Application error when access /_layouts/15/sitemanager.aspx, Error=Object reference not set to an instance of an object.&nbsp; </em></p>
<p><em>&nbsp;at Microsoft.SharePoint.Publishing.CommonUtilities.ConcatUrlsOrFileSystemPaths(String firstPart, String secondPart, String separatorString)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at Microsoft.SharePoint.Publishing.Internal.WebControls.SmtUrlGenerator.GetListNewItemLink(ICachedList list, String webServerRelativeUrl, Boolean includeQueryString)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at Microsoft.SharePoint.Publishing.Internal.WebControls.SmtListEcbMenu.setupTypeSpecificMenu()&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at Microsoft.SharePoint.Publishing.Internal.WebControls.SmtEcbMenuFactory.CreateSmtEcbMenu(Control ownerTreeView, ISmtPageControl smtPageControl, ObjectSerializer treeViewObject, ObjectSerializer treeViewObjectParent, String menuPrefix)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at Microsoft.SharePoint.Publishing.Internal.WebControls.SmtTreeNode.createEcbMenu(Control ownerTreeView, ObjectSerializer treeViewObject, ObjectSerializer treeViewObjectParent)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at Microsoft.SharePoint.Publishing.Internal.WebControls.EcbEnabledTreeNode.RenderPreText(HtmlTextWriter writer)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at System.Web.UI.WebControls.TreeNode.Render(HtmlTextWriter writer, Int32 position, Boolean[] isLast, Boolean enabled)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at System.Web.UI.WebControls.TreeNode.RenderChildNodes(HtmlTextWriter writer, Int32 depth, Boolean[] isLast, Boolean enabled)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at System.Web.UI.WebControls.TreeNode.Render(HtmlTextWriter writer, Int32 position, Boolean[] isLast, Boolean enabled)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at System.Web.UI.WebControls.TreeView.RenderContents(HtmlTextWriter writer)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)&nbsp;&nbsp;&nbsp; </em></p>
<p><em>&nbsp;at ASP._layouts_15_sitemanager_aspx.__RenderForm1(HtmlTextWriter __w, Control parameterContainer)</em>&nbsp;&nbsp;&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: small;">CallStack reveals the source code that hit the problem. In this case, the highlighted method of Microsoft.SharePoint.Publishing.CommonUtilities.ConcatUrlsOrFileSystemPaths encountered a null object reference. That means, it expects an instantiated object, but the object doesn&rsquo;t exist. In this case, source code analysis is required to understand the possible cause(s) of this error. Usually there will be more than one possibilities. In this case, the mostly likely cause is a list doesn&rsquo;t have a &ldquo;New Item Form&rdquo;. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Each list by default has a &ldquo;New Item Form&rdquo;, which is used when you click the &ldquo;New Item&rdquo; menu button of the list. It can be edited/deleted in SharePoint Designer though. By deleting it in my test tenant, I can reproduce the same error message as customer&rsquo;s. By far, we have a possible cause, but still we lack below important facts:</span></p>
<ol>
<li>
<p>We don&rsquo;t know for sure this is the same issue in customer&rsquo;s site. No matter how alike the symptoms are, it is possible it is something else.</p>
</li>
<li>
<p>Assume there is a list that gets the &ldquo;New Item Form&rdquo; missing, how can we find it? If there are just a few lists, it won&rsquo;t be of too much effort. However, for many customers, there might be hundreds, if not thousands of lists in a site. Unfortunately, this customer is one of them. So it is hard to narrow down to the victim(s) by click and open the lists one by one.</p>
</li>
</ol>
<p><span style="font-family: Calibri; font-size: small;">Now what should I do? It seems some automation is needed to examine the list&rsquo;s in a site, specifically, to find out those w/o &ldquo;New Item Form&rdquo;. That&rsquo;s when the SharePoint client object model (CSOM) comes into play. If you are interested, this </span><a href="https://msdn.microsoft.com/EN-US/library/office/fp179912.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">article</span></a><span style="font-family: Calibri; font-size: small;"> describes most operations can be done programmatically. You can run the CSOM code with client application built with C#/VB.NET, or JavaScript on a SharePoint page, or PowerShell script within the </span><a href="https://www.microsoft.com/en-us/download/details.aspx?id=35588"><span style="color: #0000ff; font-family: Calibri; font-size: small;">SharePoint Online Management Shell</span></a><span style="font-family: Calibri; font-size: small;">, which is my favorite because of its convenience. </span></p>
<p>Set-ExecutionPolicy Unrestricted -Force</p>
<p>[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")</p>
<p>[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")</p>
<p>&nbsp;</p>
<p>$siteURL = "https://&lt;site_URL&gt;/"</p>
<p>$username = "&lt;admin_email&gt;."</p>
<p>$password = "&lt;password&gt;"</p>
<p>&nbsp;</p>
<p>$securePassword = ConvertTo-SecureString $password -AsPlainText -Force</p>
<p>$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePassword)</p>
<p>&nbsp;</p>
<p>$context = New-Object Microsoft.SharePoint.Client.ClientContext($siteURL)</p>
<p>$context.AuthenticationMode = [Microsoft.SharePoint.Client.ClientAuthenticationMode]::Default</p>
<p>$context.Credentials = $credentials</p>
<p>&nbsp;</p>
<p>$web = $context.Web</p>
<p>$context.Load($web.Lists)</p>
<p>$context.ExecuteQuery()</p>
<p>foreach($list in $web.Lists){</p>
<p>&nbsp;&nbsp;&nbsp; $context.Load($list)</p>
<p>&nbsp;&nbsp;&nbsp; $context.Load($list.Forms)</p>
<p>&nbsp;&nbsp;&nbsp; $context.ExecuteQuery()</p>
<p>&nbsp;&nbsp;&nbsp; if($list.BaseType -ne "DocumentLibrary" -and $list.Hidden -eq $false){</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $form = $list.Forms|?{$_.FormType -eq "NewForm"}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $msg = $list.Title + ":" + $form.ServerRelativeUrl</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $msg</p>
<p>&nbsp;&nbsp;&nbsp; }</p>
<p>}</p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">The above script enumerates all the lists in a site, along with their New Item Form&rsquo;s URLs. From the result, we can easily find out those whose New Item Form URLs are empty. </span></p>
<p><span style="font-family: Calibri; font-size: small;">My customer ran it, and they did find two such lists. After adding the New Item Forms with SharePoint Designer to those two lists, the SiteManager.aspx page comes back successfully. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Now let&rsquo;s retrospect the interactions between a SharePoint admin and a Microsoft support. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 1: the admin provides a Correlation ID and tells the support the SiteManager.aspx goes wrong. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 2: the support extracts Logs with the ID, and research the possible causes. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 3: the support tells the admin that possibly some lists w/o new item form result in the error.</span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 4: the admin tells the support engineer it is hard to examine all lists manually, and requests some easier way. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 5: the support engineer comes up with a PowerShell script and guidelines to install the SharePoint Online Management Shell. Then the admin follows the instruction and fixes the problem. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Then what can the admin do to improve the process? </span></p>
<p><span style="font-family: Calibri; font-size: small;">In step 1, as we have mentioned earlier, to provide the correlation Id in time is very important. In step 4, some admins with coding experience can do it by themselves, although It is not necessary. But once you grasp the skill, you&rsquo;ll find it extremely useful. Many management work otherwise impossible or very time-consuming, can be achieved with ease. </span><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: small;">Despite the fact that it is literally forbidden to provide an admin account to a support engineer, in practice it can accelerate the troubleshooting by eliminating unnecessary roundtrips during the process. Even providing a temp account would be very helpful. We were very lucky in this case and the root cause was found with only one shot. But sometimes it can take far many roundtrips before a problem is solved. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Of course, the security risk does exist. So balance the risk (the importance of the data, the credibility of the support engineer, etc.) and efficiency, and make a smart decision. As you can see from above analysis, the more skills you grasp, the less dependencies you have on the others, and the quicker you can solve a problem. </span></p>
<p><span style="font-family: Calibri; font-size: small;">That&rsquo;s all for the first post. Hope everyone enjoys it. </span></p>]]></content:encoded>
    </item>
  </channel>
</rss>