Indexing Large Files in SharePoint 2010

Like it’s predecessor, SharePoint 2010 also doesn’t index files larger than 16 MB by default. This is because the search service application property ‘MaxDownloadSize’ is set to 16 MB by default. We can change this by running the following PowerShell commands and restarting search service.

$dSize = Get-SPEnterpriseSearchServiceApplication;
$dSize.SetProperty("MaxDownloadSize", 32);

The above commands will increase the max size of files that SharePoint can index to 32 MB from 16 MB (default).

To restart search service, run the following command on the indexing server.

Restart-Service osearch14;

Access Denied while Creating Publishing Pages

The issue is, when a user with contribute permission (or even design) in a sub-site tries to create a publishing page (eg: enterprise Wiki page) he/she gets an ‘access denied’ error message within the popup window for creating new page. This might be because the administrator of the site collection which the page or sub-site is in might have deleted a built-in security group called “Style Resource Reader”. This group is automatically created when publishing feature is enabled in a site collection and is used to give all authenticated users permission into the resources (like master pages and RSS files) needed to render pages in the site collection and it’s sub-sites. Usually this security group is given read permission into the Master Page Gallery and Style Library in the site collection.

If permission for this group is removed accidently by the site collection administrator, you can reassign the permission by performing the following steps.

  1. Navigate to the site collection with a site collection admin user account.
  2. Open Site Actions > Manage Content and Structure
  3. Expand the dropdown menu on Master Page Gallery on the left navigation tree and select Edit Properties
  4. Click on ‘Permission for this document library’ link under Permissions and Management section
  5. Click on Grant Permission button on the ribbon
  6. Type in “Style Resource Readers” (or any other name you provided if you changed the group name) and resolve the name
  7. Check Read permission and click OK.
  8. Make sure that ‘NT AUTHORITY\Authenticated Users’ group is present in the security group
  9. Repeat the above steps for Style Library

If the permission group is completely deleted from the site collection, recreate the group with same name (or any other names) and perform the steps above to give it appropriate permission.

Dynamic Filtering Based on List/Library Column

There might be a situation where you, as a site designer, have to create several views of a list or document library to show it’s contents filtered based on a column (eg: category) in it. Instead of creating so many views manually, you can use SharePoint Designer to create a Data View Web Part (DVWP) which dynamically filters the content based on the value of a column. The detailed procedure to created it is as follows.


  1. SharePoint site in which you are a design/owner.
  2. SharePoint Designer 2010 (installed in your workstation).
  3. Working knowledge in SharePoint Designer 2010.


The procedure includes two parts. First part is to create a page with a data view web part using SharePoint Designer to accept the column value as query string and filters the list based on that value. Second part is to create custom navigation links (in left navigation pane of the SharePoint site) to the same page containing the data view web part just by changing the query string value.

Part 1: Creating a page with Data View Web Part.

  1. Create a new page in the SharePoint site and save it (eg: DynamicView.aspx).
  2. Open SharePoint Designer (SPD) in your local workstation and open your site.
  3. Select ‘Site Pages’ (or the page library where you created the new page) on the left navigation pane and select the page you just created.
  4. Click on ‘Edit File > Edit File in Normal Mode’ in the ribon
  5. After opening the page in design view (there is a tab on the bottom of the page to switch through Design, Code and Split views), place cursor within the main content placeholder and place a Data View Web Part (DVWP). In order to do this, expand Data View button in the ribbon under Insert tab and select the list/library you created in step 1.
  6. Now, make sure that the newly placed data view web part is selected and click on Parameters button in the ribbon under Options tab.
  7. In the popup window, click on ‘New Parameter’ button to create a new parameter.
  8. Give a parameter name (eg: parDocCategory), select Query String as Source and give a name for Query String Variable. Click OK.
  9. Again, make sure that the data view web part is selected and click on Filter button in the ribbon.
  10. Choose the list column you want to filter on (eg: DocCategory) as ‘Filter Name’ , Equals as Comparison and the parameter you created (eg: parDocCategory) as Value and click OK.
  11. You are done creating a data view web part which is capable of filtering the list/library content based on the value passed to the page as query string. Part 1 is complete.

Part 2: Creating Links to Dynamic View Page.

In the example document library that this article refers to, I’ve created a Choice column called ‘Doc Category’ to filter the documents on. The values are Policies, Requests and Procedures. So I’ll have to create three navigation links on my SharePoint site to navigate to the same page I created in Part 1 but with different query string values (query String is a part of URL in the form "?QueryStringName=Value" used to pass data/values into a web page). For example, the URL for the page I created in Part 1 to list all documents in category ‘Policies’ should be https://<example_site_url>/SitePages/DynamicView.aspx?DocCategory=Policies.

In order to create the navigation links,

  1. In the SharePoint site, navigate to Site Settings > Navigation.
  2. Under Current Navigation, click on Add Link…
  3. Provide a Title (eg: Policy Documents) and URL as /SitePages/DynamicView.aspx?DocCategory=Policies">/SitePages/DynamicView.aspx?DocCategory=Policies">/SitePages/DynamicView.aspx?DocCategory=Policies">https://<your_site_url>/SitePages/DynamicView.aspx?DocCategory=Policies
    Note: The query string name ‘DocCategory’ has to be the same as one you provided for Query String Varable in step 8 of Part 1.
  4. Create links for other categories by just changing the query string value (eg: ?DocCategory=Requests, ?DocCategory=Procedures etc.).

“The form cannot run the specified query” in InfoPath 2007 Forms Migrated to SharePoint 2010

InfoPath 2007 forms migrated to a SharePoint 2010 site may show this error. It happens when the form contains controls which populate data from a SharePoint list using the following URL in data connection.


The ULS errors being logged for this error would be,

 The form cannot run the specified query. The remote server returned an error: (400) Bad Request.)

A workaround for this problem is to modify the data connection and append “&noredirect=true” to the URL. So the resulting URL would look like


Restoring Deleted Site Collections

One of the best features that SP1 brought to SharePoint administration is the ability to recover deleted site collections. I’ve had many incidents where this came handy.

You have to use PowerShell or Object Model recover a deleted site collection. Here is how you can do it using PowerShell.

In SharePoint 2010 Management Shell, provide the following command.

Restore-SPDeletedSite -Identity <relative URL or GUID>

More details on this command can be found in this Technet article. The deleted site collections are stored as SPDeletedSite objects. If you do not remember the URL or GUID of the deleted site collection, you can find it using the command,