Skip Ribbon Commands
Skip to main content

July 16
Clear SharePoint Designer Cache
To clear the SharePoint Designer 2010 Cache or SharePoint Designer 2007 Cache, delete the contents located in the following directories:
  • %APPDATA%\Microsoft\Web Server Extensions\Cache
  • %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\
January 10
The security validation for this page is invalid (SharePoint)
After migrating from MOSS 2007 to SharePoint 2010 while using a custom master page, an error message stating "The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again." may be displayed.

The error can become present while adding users to a SharePoint group, changing the title to SharePoint site, deleting a column from a SharePoint list and numerous other actions. In order to suppress the issue, the following code should be added to the custom master page:

<asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server">
<SharePoint:FormDigest runat="server"/>
December 13
Windows Explorer/Office and SharePoint Issues
Using claims based authentication, multiple users are receiving error messages similar to below while attempting to open a SharePoint library in Windows Explorer or while doing a Save As from an external application to a SharePoint location.
Claims Does Not Support
Due to claims authentication in SharePoint, the token issued to a user is only good for approximately the timeout duration. Once the token is expired, the user will start to experience errors while attempting the above actions.
IE 7 and above uses a security zone protection feature called Protected Mode. The feature stores persistent cookies from web pages into an isolated location from the regular cache used by other applications (Office, Windows Explorer, etc.) .  Protected mode is enabled for the following zones: Internet, Intranet, Restricted.   The zone assignments for sites can be found using rsop under Computer Configuration/Administrative Templates/Windows Components/Internet Explorer/Internet Control Panel/Security Page/Site to Zone Assignment List).
Add the web site URLs to the Trusted Sites zone with protected mode turned off.  This will store the persistent cook in the regular shared cache allowing external applications access to the user’s token.
December 03
Add a SharePoint Farm Administrator via PowerShell
The following script will add a SharePoint administrator to the farm.  The user will be added to the Farm Administrators group in Central Administration, all web applications with ful control authorization, and as a shell adminstatator to all content databases.

$ADAccount = Read-Host "Enter the Adminstrator's domain account in the format of DOMAIN\USERNAME"
$ADAccount = "i:0#.w|$ADAccount"
$caWebApp = Get-SPWebApplication -IncludeCentralAdministration | where-object {$_.DisplayName -eq "SharePoint Central Administration v4"}
$caSite = $caWebApp.Sites[0]
$caWeb = $caSite.RootWeb
Write-Host "Adding $ADAccount to the Farm Administrators group in Central Administration"
$farmAdministrators = $caWeb.SiteGroups["Farm Administrators"]
$farmAdministrators.AddUser($ADAccount, "", $ADAccount, "Configured via PowerShell")
$caDB = Get-SPContentDatabase -WebApplication $caWebApp
Add-SPShellAdmin -Database $caDB -Username $ADAccount
for($i = 0; $i -lt $WebAppServices.Count; $i++){
                $webApp = $WebAppServices[$i]           
                Write-Host "Adding $ADAccount to $webApp.Name"
                $policyAD = $webApp.Policies.Add($ADAccount, $ADAccount)
                $policyRoleAD = $webApp.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullControl)
                $dbs = Get-SPContentDatabase -WebApplication $webApp
                foreach($db in $dbs){
                                Write-Host "Adding $ADAccount to $db"
                                Add-SPShellAdmin -Database $db -Username $ADAccount
Write-Host "Script Complete"
November 12
PowerShell to start SharePoint 2010 Sandboxed Code Service
Create a new .ps1 file on any server in the SharePoint farm and add the following code to start the SharePoint foundation Sandboxed Code Service on all servers in the SharePoint farm. Give the file any name and run the script from the SharePoint 2010 Management Shell.
$servers = Get-SPServer | ? { $_.Role -ne "Invalid" }
foreach($server in $servers)
 $services = Get-SPServiceInstance -Server $server.Name
        foreach($service in $Services)
         if($service.TypeName -eq "Microsoft SharePoint Foundation Sandboxed Code Service")
                  Write-Host "Attempting to start" $service.TypeName "on" $server.Name
                        if($service.Status -eq "Online")
                         Write-Host "Service is already started"                                                 
                                Start-SPServiceInstance $service.ID | out-null
                                Write-Host "Service started"
September 13
Selectively Visually Upgrade SharePoint 2010 Site Collections in PowerShell

After a MOSS 2007 to SharePoint 2010 migration, some site collections in a web application may need to stay in the MOSS 2007 (version 3) UI. This could either be for legacy web parts, custom branding, customer needs, etc.  The first step is to identify the sites to be "black listed" in the upgrade process.  Next, create a new .ps1 file with code below.  Copy the $sitesToIgnore lines and replace the URL for as many site collections as required. From the SharePoint 2010 Management Shell on one of the SharePoint servers, run the the script and when prompted, enter the root web of the web application to start the script.


$webAppURL = Read-Host "Enter URL for the Root Web of the Web Application"

$webApp = Get-SPWebApplication $webAppURL


$sitesToIgnore = New-Object "System.Collections.Generic.List``1[System.String]"

$sitesToIgnore.add("SPSite Url=http://webapp/site1")

$sitesToIgnore.add("SPSite Url=http://webapp/site3")

$sitesToIgnore.add("SPSite Url=http://webapp/site3")


foreach($site in $webApp.Sites)




                                write-output  "$site ignored"




                                write-output "Updating $site"






August 07
SharePoint 2010 Disable Office Web Apps
To disable Office Web Apps and set the default open behavior to open in the client, run the following PowerShell script changing "APPLICATIONNAME" with the specific SharePoint web application name.
$OpenInClientFeatureId = "8A4B8DE2-6FD8-41e9-923C-C7C3C00F8295"
$OfficeWebAppsFeatureId = "0C504A5C-BCEA-4376-B05E-CBCA5CED7B4F"
Get-SPWebApplication "APPLICATIONNAME" | Get-SPSite -Limit ALL | % {
                Enable-SPFeature $OpenInClientFeatureId -Url $_.Url
                Disable-SPFeature $OfficeWebAppsFeatureId -Url $_.Url -Confirm:$false
July 30
SharePoint Datasheet View Shows Duplicate Records
If you have a view that does not include the required lookup field and you "Switch to Datasheet" then the datasheet shows duplicate items.  The number of duplicate rows depends on how many multi-values are selected. This will also occur while exporting to excel.
The affected list has a required lookup field which allows multiple values.
A work-around is to create a specific view with the field included. It's important to include the field in the view to avoid duplicates.
July 17
Delete a Sealed SharePoint 2010 List Column with PowerShell
Adding certain fields to a SharePoint list or library through the "Add from existing site columns" option, creates a new list column without the option to be retroactively deleted. 
The field will display as a normal field via the list settings menu. However, when clicking on the column, there is no delete button. Attempting to delete the list from SharePoint designer will generate an error message stating the column is sealed and it cannot be deleted.
In SharePoint 2010, to remove the sealed field, run the SharePoint 2010 Management Shell and enter the following:
$web = Get-SPWeb("http://SITE")
$list = $web.Lists["LIST"]
$field = $list.Fields["COLUMN"]
$field.Allowdeletion = $true
$field.Sealed = $false
Note:Change SITE to the URL of the sub site, and LIST/COLUMN to the pertinent list and column.
July 08
Set Portal Super User and Super Reader Accounts in SharePoint 2010

After a new install of SharePoint Server 2010, the following errors may be displayed in the application log on any/all servers in the SharePoint farm:

The super user account utilized by the cache is not configured. This can increase the number of cache misses, which causes the page requests to consume unneccesary system resources.


The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases.

  1. Create two separate Active Directory service accounts (superuser, superreader)
  2. Add the SuperUser account to the web application policy with full control
  3. Add the SuperReader account to the web application policy with read only
  4. Run the following PowerShell script on one of the servers in the SharePoint farm (change NAMEOFWEBAPPLCIATION, DOMAIN\SUPERUSERACCOUNT, and DOMAIN\SUERREADERACCOUNT with the proper values):

$webApp = Get-SPWebApplication -Identity "NAMEOFWEBAPPLCIATION"
$webApp.Properties["portalsuperuseraccount"] = "DOMAIN\SUPERUSERACCOUNT"
$webApp.Properties["portalsuperreaderaccount"] = "DOMAIN\SUPERREADERACCOUNT"

June 24
Set the UI Version for a SharePoint 2010 Site
If a SharePoint site has been visually upgraded after a WSS 3.0 or MOSS 2007 migration, there is no action through the browser to reset the UI back to the migrated version (3). 
Running the following PowerShell script on a server in the SharePoint farm will reset the UI back to version 3.  If needed, running the script with "$web.UIVersion = 4" will reset the UI to the 2010 UI.
$web = get-spweb "http://ENTERSITEURLHERE"
$web.UIVersion = 3
$web.UIVersionConfigurationEnabled = $TRUE
June 17
Load Control Template File /_controltemplates/TaxonomyPicker.ascx Failed
Upon a new installation of SharePoint Server 2010, the following error is displayed in the Application Log:
"Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type 'Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker' from assembly 'Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c'."
Source: SharePoint Foundation
Event ID: 7043
Task Category: Web Controls

The TaxonomyPicker class does not in exist in the Microsoft.SharePoint.Portal.dll
In each server in the SharePoint Farm, locate and rename the following file (e.g. TaxonomyPicker.bad):
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\TaxonomyPicker.ascx
June 12
Install iOS 6 Beta
To install the iOS 6 Beta the following prerequisites must be met:
  • Apple Developer account
  • The device has been added to the Provisioning Portal in iOS Dev Center (iPhone 3GS, iPhone 4, iPhone 4s, iPad 2, new iPad (gen 3), or iPod touch 4G)
  • Download and provision the associated required developer certificates for the device
  • Download and unpack the iOS 6 beta for the associated target device
  • Download/update iTunes 10.6.3

To install iOS 6 Beta:

  1. Once the iOS 6 download is completed, unpack the .dmg to a .ipsw and save in an accessible location.
    Note: .dmg files cannot natively be extracted in a Windows OS.  Use a third party tool to extract the file and continue with the following steps. 
  2. Open up iTunes 10.6.3 and navigate to the target device.
  3. Option (Alt) click on the restore button under the version heading and navigate to the iOS 6 .ipsw file.
  4. Once the iOS 6 restore has been completed, you will need to set up the device or restore from iCloud.
  5. Enjoy.
June 11
SSPI handshake failed with error code 0x8009030c


While navigating to a SharePoint Server 2010 site on the local server where SharePoint is installed, the following error may persist in the Application Log:

SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure. The logon attempt failed 



The registry setting to disable loopback check needs to be entered.  In MOSS 2007, logging in to a SharePoint site from the server would result in a timeout and/or error message.  In SPS 2010, the server returns an error upon first load to the GUI and upon refresh will display the requested page. 


To set DisableLoopBackCheck:

1. Click Start

2. Search for "regedit"

3. Right click on regedit.exe and select Run as Administrator

4. Expand the tree to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

5. Right click on LSA and click New --> DWORD Value

6. Enter the name DisableLoopbackCheck

7. Right click on DisableLoopBackCheck and click Modify

8. Enter 1 for the Value and click OK

9. Restart the server


Upon navigating to the SharePoint site, the application log should no longer be populated with errors for "SSPI handshake failed with error code 0x8009030c"

June 07
Exception from HRESULT: 0x80070020

When attempting to start a site through Internet Information Services (IIS) Manager, the error message "The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)" is displayed in a prompt.

Another service or web server is listening on the same port as the IIS site.

To find the service or web server listening on the same port:
1. Note the bindings in the IIS site (right click on the site and select Edit Bindings)
2. Open up command prompt as administrator and type "netstat -ano > netstatresults.txt"
3. Navigate to the folder where the command prompt was ran and open up netstatresults.txt
4. Note the PID number LISTENING on the IIS site's port (the port will be after the ":" in the Local Address column)
5. Open up the Task Manager (right click on the Task Bar and click Start Task Manager)
6. Click the Services tab
7. Filter the PID column and locate the PID noted in step 4
8. Right click on the entry and select Stop Service

The service may automatically start upon login or reboot.  The service should be investigated, stopped permanently, or the port renamed to prevent further conflicts.

June 06
Edit SharePoint WSP Solution Contents
If provided a third party SharePoint WSP solution, there may be need to edit contents of the package to conform with governance for the SharePoint farm.
To extract the contents of a WSP package, make modifications, and repackage the WSP:
1. Download and install WSP Builder or WSP Builder Extensions ( from Codeplex
2. Run the command prompt as an administrator
3. Change the current directory to the directory including WSPBuilder.exe (e.g. "cd C:\Program Files (x86)\WSPTools\WSPBuilderExtensions")
4. Run the following command from the command prompt, replace {WSPLOCATION} with the location of the WSP and the {OUTPUTLOCATION} with the folder to extract the contents
   WSPBuilder.exe -o extractwsp -filename {WSPLOCATION} -targetpath {OUTPUTLOCATION}
5. Make any modifications neccassary to the extracted files
6. Run the following command from the command prompt, replace {WSPLOCATION} with the location of where the WSP should be created and the {OUTPUTLOCATION} where the previously extracted contents exist
   WSPBuilder.exe -ProjectPath {OUTPUTLOCATION} -SolutionPath {OUTPUTLOCATION}  -Outputpath {WSPLOCATION}
Once the WSP is packages, it should behave as a typical SharePoint solution deployable via the STSADM command line or through PowerShell.
May 31
Connect to SQL Server When Administrators Are Locked Out

If all users who are sysadmin in SQL server have been removed from the role/locked out/unavailable in an emergency, or the sa account is no longer working, there is a built in operation to regain administrative access to the SQL server.

To start SQL Server in Single User Mode:
First stop the SQL Server and SQL Server Agent services on the server.
Open up a new command prompt as Administrator.
Change to the default instance BINN directory (e.g. C:\Program Files\Microsoft SQL Server\MSSQL11\MSSQL\Binn)
Type “sqlserver.exe –m” to start SQL Server in single user mode.
Open up SQL Management Studio as you normally would.
Make any permissions changes needed.

To restart SQL Server normally:
Close the command prompt.
Right click on the server name in SQL Management Studio and click on Start.

May 12
Get Date an Image was Taken in C#
To get the date an image was taken in C# by passing through the file location of an image, use the following:

public static DateTime GetDateTakenFromImage(string path)
    Image myImage = Image.FromFile(path);
    PropertyItem propItem = myImage.GetPropertyItem(36867);
    string dateTaken = new Regex(":").Replace(Encoding.UTF8.GetString(propItem.Value), "-", 2);
    return DateTime.Parse(dateTaken);
May 01
Send an Email in SharePoint using C#

To send an email in a SharePoint solution using C#, add the following using statements at the top of your code (after referencing the Microsoft.SharePoint DLL in Visual Studio):


using Microsoft.SharePoint;

using Microsoft.SharePoint.Utilities;


In your class, add the following method:


/// <summary>

/// Send an email from a SharePoint Web

/// </summary>

public void SendMail(SPWeb web, string Email, string Subject, string Body)


   //send the email

   SPUtility.SendEmail(web, false, false, Email, Subject, Body);




  • A valid SPWeb object will be needed to pass to the method
  • Multiple email addresses may be passed to the Email parameter. 
  • The From address will be in the configuration of the web application
April 26
SharePoint Task List not Sending "Assigned To" Ownership Emails
A SharePoint list created from the Tasks list template has a people and group field for Assigned To attached to the list.  In the List Settings under Advanced settings, there is an option to "Send e-mail when ownership is assigned".  Even though the setting may be set to "Yes", emails sometimes do not get sent. 
To resolve this issue, change the "Send e-mail when ownership is assigned" to "No", save, and the reset the option to "Yes".  Emails should now be properly set upon new ownership assignment.  If emails are still not being sent, verify outgoing email settings in Central Administration.
1 - 20Next