Monthly Archives: February 2012

Service Unavailable In IIS

In IIS 6.0 I created an application pool for a new application and set the identity to a Windows domain account.  When I tried to load the application I was greeted with “Service Unavailable”.  The Windows system event log showed the two messages below:

A failure was encountered while launching the process serving application pool ‘xxx’. The application pool has been disabled.

The identity of application pool ‘xxx’ is invalid, so the World Wide Web Publishing Service can not create a worker process to serve the application pool.  Therefore, the application pool has been disabled.

In order to fix the problem I added the application pool account to the IIS_WPG local group on the web server.


Unable To Edit SharePoint Web Part – File Not Found

Whilst working on a SharePoint 2010 site I needed to edit a web part.  However, after I’d chosen to edit the page, clicking on the arrow to edit the web part didn’t do anything.

I ticked the checkbox and selected Edit Properties from the ribbon.  This produced a File Not Found error.

I navigated to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS on the web front end server and opened the latest log file.  Searching for FileNotFound found the error below

System.IO.FileNotFoundException: The file /hr/_catalogs/masterpage/_controltemplates/Welcome.ascx does not exist.

A quick Google for the error indicated that the error was related to the masterpage.  This site has a custom masterpage which resides at the top level of the farm and when checked was fine.  However, the error was being produced by the default.master masterpage for the site.  Viewing the site in SharePoint Designer, I opened the default.master masterpage under _catalogs/masterpage and navigated to the top section of the file below

<%@ Register TagPrefix=”wssuc” TagName=”Welcome” src=”_controltemplates/Welcome.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”MUISelector” src=”_controltemplates/MUISelector.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”DesignModeConsole” src=”_controltemplates/DesignModeConsole.ascx” %>

The error is caused by the three lines missing ~/ from the src.  Updating the tags as below fixed the error

<%@ Register TagPrefix=”wssuc” TagName=”Welcome” src=”~/_controltemplates/Welcome.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”MUISelector” src=”~/_controltemplates/MUISelector.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”DesignModeConsole” src=”~/_controltemplates/DesignModeConsole.ascx” %>


Build A SharePoint 2010 Development Environment

The instructions below are a brief guide to building a development/test SharePoint 2010 standalone environment.  The basic steps are:

  • Build a Windows Server 2008 R2 server
  • Install a standalone instance of SharePoint 2010
  • Copy over and restore the live content, profile, social and sync databases
  • Install and apply any customization and web parts.

Install Windows Server 2008 R2 SP1.  If you run Windows Update, don’t install .NET Framework 4 as it’s incompatible with SharePoint 2010.

Run splash.hta from the SharePoint installation source and install prerequisites

Continue to run and reboot until all prerequisites are installed

Install SharePoint server, enter product key, choose standalone installation type

Run the SharePoint Products Configuration Wizard.  This will default web application.  From Central Administration -> Application Management -> Manage web applications, create an empty web application for My Sites.

Open Central Administration -> Application Management -> Change site collection administrators -> Select the primary and secondary site administrators

Open Central Administration -> Security -> Manage the farm administrators group.  Add the required user accounts to farm administrators

Backup the live content database, My Site database and the profile, social and sync databases using SQL Server Management Studio.  To determine the live content and My Site database names open Central Administration -> Application Management -> Manage content databases.    Select the correct Web Application and the database name will be displayed.  Clicking the database name takes you to a screen with the SQL server name.  To determine live profile, social and sync database names, open Central Administration -> Application Management -> Manage service applications.  Highlight the “User Profile Sync” line and select Properties from the ribbon.  The popup shows the database server and database names.  Copy the backups to a folder on the development server.

Delete the content database for the SharePoint – 80 web application.  Open Central Administration -> Application Management -> Manage Content Databases.  Click on the database name, scroll to the bottom of the next page, tick “Remove content database” and click OK.

Delete the content database for the My Site web application.  Open Central Administration -> Application Management -> Manage Content Databases.  Click on the database name, scroll to the bottom of the next page, tick “Remove content database” and click OK

Delete the “User Profile Synchronization” service application.  Open Central Administration -> Application Management -> Manage service applications.  Highlight the “User Profile Synchronization” line and select Delete.  Tick the box to “Delete data associated with the Service Applications”.

The SQL Server in my live environment is running SQL Server 2008 R2 SP1, so I upgraded the SQL Express 2008 instance installed by SharePoint to SQL Server 2008 R2 Express. .  Next I installed SQL Server 2008 R2 SP1.

Open SSMSE, in “Server name:” enter “localhost\sharepoint” and click Connect.  Restore the live database backups to the local SQL instance.

Attach the restored content and My Site databases to SharePoint using PowerShell.  Open the SharePoint 2010 Management Shell and type: Mount-SPContentDatabase -Name <DatabaseName> -DatabaseServer<ServerName> -WebApplication <URL>

Apply any customizations and install web parts

Configure the Farm Account.  Open Central Administration -> Security -> Configure service accounts.  Click “Register new managed account” and enter the farm account information.  Select “Farm Account” from the list and select your newly registered service account from the list.

Create a new “User Profile Synchronization” service application that points to the restored databases.  Open Central Administration -> Application Management -> Manage service applications.  Click New -> User Profile Service Application from the ribbon.  Enter a name, an application pool and for the profile, synchronization and social databases enter the name of the restored databases.  Populate the My Site information, then click Create.

Run a full crawl of the environment.  Open Central Administration -> Application Management -> Manage service applications.  Click on “Search Service Application”.  From the left hand menu click on “Content Sources”, hover over “Local SharePoint sites” and select Edit from the dropdown list.  Scroll to the bottom of the screen and tick “Start full crawl of this content source” and click Ok.