Nick Grattan's Blog

About Microsoft SharePoint, .NET, Natural Language Processing and Machine Learning

Archive for the ‘SharePoint Administration’ Category

SharePoint: Opening CSV files with Microsoft Excel

with 10 comments

By default, if open a .CSV file in a SharePoint the browser will prompt you to save the file. Ideally, you probably want the file to be opened directly in Microsoft Excel. There are two configuration options that need to be made. The instructions here are for SharePoint 2010 but are similar for SharePoint 2007.

  • Add an entry to DOCICON.XML

This file is located by default at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\XML. Open the file DOCICON.XML for editing and add the following line in the ByExtension element:

<Mapping Key=”csv” Value=”icxltx.png” OpenControl=””/>

This ensures that the Excel icon is displayed alongside CSV files.

Note: if you want to be prompted to open read-only or for edit remove ‘OpenControl=”” ‘ in the Mapping Key.

  • Change the MIME type associated with the CSV Extension in Internet Information Server (IIS)

To do this:

  1. Run the “Internet Information Services (IIS) Manager” application from the Start/Administrative tools menu.
  2. Select the server in the left-hand pane.
  3. Select “MIME Types” in the list of options in the middle pane.
  4. Then locate the .CSV entry (it should already exist) and change the MIME type to: application/, and click OK.

Once these configuration options are complete perform an IIS Reset.

CSV files should now be opened using Excel by default. You will be prompted that a change in file extension has occurred when using Office 2007. You will need to click Yes in this warning message.

Written by Nick Grattan

January 5, 2011 at 9:11 am

Adobe PDF IFilter Indexing with SharePoint 2010

with 40 comments

This note explains how to enable PDF indexing using the Adobe IFilter version 9.0 in Microsoft SharePoint 2010. This note is adapted from the Adobe note explaining how to configure the 64 bit IFilter for SharePoint 2007 (see: ).

Now add PDF as a file type:

  • Run Central Administration.
  • Click Manage service applications under “Application Management”:

  • Click the Search Service Application link in the list of applications.

  • Click File Types  under “Crawling” in the left navigation area:

  • Click New File Type.
  • Enter pdf for the “File Name Extension” and click OK.

  • Using Regedit on the server, navigate to

\\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\Filters

  •  Right-click the Filters  folder and select New Key. Enter “.pdf” for the key value.
  • Add the following values to this key:

<REG_SZ> Default = <value not set>
<REG_SZ> Extension = pdf
<REG_DWORD> FileTypeBucket = 1
<REG_SZ> MimeTypes = application/pdf

 The key should look like:

  • Navigate to: \\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension
  •  Right-click the Filters  folder and select New Key. Enter “.pdf” for the key value.
  • Set the “default” value to {E8978DA6-047F-4E3D-9C78-CDBE46041603}

 The key should look like:

You can now add an image to be used for the icon for PDF documents:

  • Add an image (typically gif or png, use Google images to find an example) for the PDF icon to the folder:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES

  •  Open the file docicon.xml from the location:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML

  •  Add a link to map the pdf extension to the image by adding a link like the following to the ByExtension element:

                 <Mapping Key=”pdf” Value=”pdf_icon.gif” OpenControl=””/>

  •  Finally, issue an IISReset and restart the Windows services “SharePoint Foundation Search V4” and “SharePoint Server Search 1”.

Your PDF documents should now be indexed on the next indexing crawl.

 Update 15-Feb-2011: See this blog post for a useful PowerShell script that automates this process:

Written by Nick Grattan

June 14, 2010 at 3:31 pm

Will My MOSS Farm Stop Working?

with one comment

Or am I more likely to be abducted by aliens? Well, if you installed MOSS Service Pack 2 from a download before the 29th July 2009 your production MOSS Farm could stop working in the future. This is explained in Microsoft KB 971620 and in this Microsoft blog post.

In summary, initial releases of SP2 was configured as a trial version, and unless re-installed, MOSS features will stop working 180 days after you installed SP2. The value “180” is reported in the KB, but this value seems to be different in practice.

To determine if your MOSS Farm is at risk you can:

  • Run Central Administration.
  • Select Operations.
  • Select Convert license type in the “Upgrade and Migration” section.

The description of “Current License” will show if you installed SP2 with the trial version problem:


You can also determine when the trial version will expire:

  • Run Central Administration
  • Select Application Management.
  • Select Check services enabled in this farm in the “Office SharePoint Server Shared Services” section.

A warning will be displayed if you’re running the trial version:


KB 971620 contains a link to a hotfix to correct this issue. This hotfix may require you to reboot the server. Before testing if the fix was applied correctly, issue an IISRESET before running Central Administration.

Thanks to Tim at Cork County Council for pointing out this issue.

Written by Nick Grattan

November 6, 2009 at 8:42 am

SharePoint Versions – MOSS v. SharePoint Services

with 2 comments

In this post I explained how to determine if your SharePoint installation is service packed, and to what level. However, the situation is a little more complex since your MOSS 2007 farm will be running Microsoft SharePoint Services 3.0 and MOSS on top.

When using Central Administration / Operations / Servers In Farm to report the version number you’re seeing the Windows SharePoint Services 3.0 version number. This will be updated when you run the Windows SharePoint Services (WSS) service pack update.

So how do you find which service pack for MOSS you’re running with? One way is to find the version number of the Microsoft.Office.Server assembly from the Windows GAC (Global Assembly Cache). To do this:

  • Run the Windows Explorer.
  • Navigate to \Windows\Assembly.
  • Right-click the file Microsoft.Office.Server and select Properties.
  • Click the Version tab.
  • Take a note of the “File Version”:


Here are the version numbers for the main MOSS services packs using this technique:

Service Pack

WSS Version (Central Admin)

MOSS Version from Microsoft.Office.Server
Unserviced packed 12.0.4518.1014
Service Pack 1 12.0.6211.1000
Service Pack 2 12.0.6420.1000

Version numbers from the Microsoft.Office.Server assembly do not follow exactly those for the WSS reported version number, but there is a close correlation.

Written by Nick Grattan

November 5, 2009 at 7:47 pm

Am I Serviced Packed?

with one comment

You can find the current version number for MOSS 2007 through Central Administration:

  • Run Central Administration.
  • Click the Operations tab.
  • Click Servers in farm under the “Topology and Services” section.

This shows the version number for the farm and each individual server in the farm:


Here are the version numbers for various MOSS 2007 service packs:

Unservice packed
MOSS Service Pack 1 (SP1)
MOSS Service Pack 2 (SP2)

For a full list of version numbers, including interim builds see here.

Update: 5 Nov 2009: See here for how to find MOSS 2007 and Windows SharePoint Services version numbers.

Written by Nick Grattan

September 1, 2009 at 4:08 pm

Content Database – Changing Default Location

leave a comment »

When new databases are created, SharePoint uses the default SQL Server location. This is typically the “C:\Program Files\MS SQL\Data” folder. Many organisations use RAID or SAN storage which may have different locations, e.g. “D:\Database”.

Within SharePoint you don’t have the option of specifying where the data and log files for the databases are created.

Using the instructions in this blog you can change this default location for new databases. For existing database you need to “DETACH” and “ATTACH” the data and log files.

Written by Nick Grattan

September 9, 2008 at 12:03 pm

Storing BLOBs Externally in SharePoint 2007

with 2 comments

Documents in SharePoint Document Libraries are stored in the SQL Server database. In most situations this works well – backing up the SQL Server content database backs up all the documents in a consistent way.

However, for storing Binary Large Objects (BLOBs) may be inefficient and costly. It may be more efficient to store such BLOBs in the file system and then link these files to SharePoint Document Libraries.

This can now be done through the ISPExternalBinaryProvider interface. Prior to SharePoint 2007 SP1 this component was available as a hot fix, but is now included mainstream.

The interface is documented here:

Written by Nick Grattan

January 17, 2008 at 12:54 pm