Archive for the ‘SharePoint Administration’ Category
Exception in MergeAspSiteMapFiles for “SharePoint 2010 Products Configuration Wizard” (PSConfig)
Recently, I’ve found that a SharePoint farm failed to update when running the “SharePoint 2010 Products Configuration Wizard” or when running PSConfig directly. The PSConfig log file in the 14 hive contained the following exception information:
07/12/2012 16:18:22 9 ERR Failed to install the application content files. An exception of type System.Xml.XmlException was thrown. Additional exception information: Name cannot begin with the '\' character, hexadecimal value 0x5C. Line 5, position 2. System.Xml.XmlException: Name cannot begin with the '\' character, hexadecimal value 0x5C. Line 5, position 2. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset, Int32& colonPos) at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.Load(String filename) at Microsoft.SharePoint.Administration.SPAspSiteMapFile.MergeAspSiteMapFiles(XmlDocument xmldocSiteMap, String strSrcFilePath, String strMergeFilePattern) at Microsoft.SharePoint.Administration.SPAspSiteMapFile.Copy(String strSrcDir, String strSrcLeaf, String strDestDir, Boolean bMergeMaps, Boolean bBackupExistingFile) at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.CopyAdminAppDomainDirectories(DirectoryInfo virtualDirectoryPath, OverwriteSetting overwrite) at Microsoft.SharePoint.Administration.SPWebService.ApplyApplicationContentToLocalServer() at Microsoft.SharePoint.PostSetupConfiguration.ApplicationContentTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask() 07/12/2012 16:18:22 9 INF Entering function TaskDriver.NotifyTaskSummary
I suspected that this was caused by a application I had deployed to the SharePoint farm. However, it was not obvious what in the application was causing the problem.
The key to finding the problem was the call to ApplyApplicationContentToLocalServer in the stack trace. Reading up on the documentation for this method indicated that this is responsible for merging all the site map in the 14 hive and placing them in the _app_bin folder for each web application in the appropriate inetpub folders. These sitemap files are XML documents with “.sitemap.” somewhere in the name.
This post is useful in understanding this process: http://sharepointinterface.com/tag/features/
Using this information I managed to find the sitemap file that was causing the problem – the XML document was invalid since in contained a “\” rather than “/”. And yes, it was installed by the application I had deployed.
Now, what I find interesting is that an issue in a site map deployed by an application can cause the SharePoint 2010 Products Configuration Wizard to fail, and therefore stop any updates from being applied. Not only interesting, but worrying too.
SharePoint 2010 – Provisioning User Profile Synchronization
Configuring AD synchronization with SharePoint 2010 can be problematic. Here’s a great post on how to configure the services, including ForeFront Identity Manager:
SharePoint 2010 Foundation, Server Service Pack 1 for Download
Here’s information on SP1 for SharePoint 2010 Foundation http://support.microsoft.com/kb/2460058. Download from here: http://www.microsoft.com/download/en/details.aspx?id=26640
And for SP1 for SharePoint Server (Enterprise and Standard) information http://support.microsoft.com/kb/2460045. Download from: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26623
SharePoint Diagnostic Studio
Talking of tools (see Favorite SharePoint Development Tools), the SharePoint Diagnostic Studio from Microsoft provides SharePoint performance monitoring functionality. This tool is particularly useful for consolidating the ULS records across servers in a SharePoint server farm. It’s part of the Microsoft SharePoint 2010 Administration Toolkit v2.0.
While useful, the user interface is not particularly polished or easy to use. In particular, the SharePoint Diagnostic Studio must be run with the language set to “US-English”, otherwise date formats will be presented incorrectly and date/time filtering will not work.
Overall Description: http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=971
Download from: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=718447d8-0814-427a-81c3-c9c3d84c456e&displaylang=en
Documentation: http://technet.microsoft.com/en-us/library/hh144782.aspx
SharePoint Global Resource (resx) file locations
Global resource (resx) files are stored in the following locations in SharePoint 2010:
- App_GlobalResources folder in the VirtualDirectories folder in inetpub (e.g. C:\inetpub\wwwroot\wss\VirtualDirectories\80)
- Resources folder in the 14 hive (e.g. C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources)
- Config/Resources folder in the 14 hive (e.g. C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\Resources)
In general, a single resx file in your solution should be copied into each of these locations during installation. This is how they are used:
- Resources files in App_GlobalResources are used when code in an ASPX page refers to a resource, e.g.
<asp:Label ID="lblNumberingTitle" runat="server" Text="<%$Resources:GlobalSiteResources, AutoNameTitle %>" />
- Resources files in the Resources folder are used when referencing resources using the SharePoint object model, e.g.
btnExport.Text = SPUtility.GetLocalizedString("$Resources:GlobalSiteResources, Tab_Export", "GloablSiteResources", language);
- Resources files in the Config/Resources are copied into the App_GlobalResources folder whenever a new web application is created. By adding the resx files here you will ensure your application will be able to access its global resource files in new web applications.
Restore Error: Path cannot be used at this time
When performing a Microsoft SharePoint 2007 restore you may receive this error:
Object NG_Documents (previous name: Documents) failed in event OnRestore. For more information, see the error log located in the backup directory.
COMException: The path specified cannot be used at this time. (Exception from HRESULT: 0×80070094)
To fix this problem you may need to apply this hot fix: http://support.microsoft.com/kb/946517
Note that this is a hotfix that is applied to Microsoft Windows Server and not to SharePoint itself.
SharePoint: Opening CSV files with Microsoft Excel
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:
- Run the “Internet Information Services (IIS) Manager” application from the Start/Administrative tools menu.
- Select the server in the left-hand pane.
- Select “MIME Types” in the list of options in the middle pane.
- Then locate the .CSV entry (it should already exist) and change the MIME type to: application/vnd.ms-excel, 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.
Adobe PDF IFilter Indexing with SharePoint 2010
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: http://www.adobe.com/special/acrobat/configuring_pdf_ifilter_for_ms_sharepoint_2007.pdf ).
- First, install the Adobe PDF 64 bit IFilter version 9 from this location: http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025
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: http://www.sharepointusecases.com/index.php/2011/02/automate-pdf-configuration-for-sharepoint-2010-via-powershell/
Will My MOSS Farm Stop Working?
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.
SharePoint Versions – MOSS v. SharePoint Services
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.0.4518 | 12.0.4518.1014 |
| Service Pack 1 | 12.0.0.6219 | 12.0.6211.1000 |
| Service Pack 2 | 12.0.0.6421 | 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.






