Preupgradecheck errors – part 3


 Missing Site definitions

The following site definition(s) are referenced by the content, but they are not installed on the web server

name = Unknown, language = 1036, template id = 53, count = 1, status = Missing            
name = Unknown, language = 3082, template id = 53, count = 2, status = Missing            

Solution :

  1. Run stsadm –o enumallwebs
  2. In the output of enumallwebs and search for templateid=”53” or template name=unknown

                For example:

                <Web Id=”c81bceb5-9e18-45b0-a42a-76887316daa9″ Url=”/sites/baseline/Gregg”       LanguageId=”1036″ TemplateName=”Unknown” TemplateId=”53″ />

<Web Id=”e8268465-b11b-431c-ad1c-d868ae9fc8ee” Url=”/sites/baseline/test hcl” LanguageId=”3082″ TemplateName=”Unknown” TemplateId=”53″ />

    Once you have the webids , remove these orphan webs using deleteweb command :

stsadm -o deleteweb -webid  “e8268465-b11b-431c-ad1c-d868ae9fc8ee” -force -databasename MyWork_WSS_Content_CPGPortal_01 -databaseserver ausb3spsdbp01

Advertisements

Health check error after applying August 2011 CU for SP2010


After installing the August 2011 Cumulative Update (CU) for Microsoft SharePoint Server 2010, the following error is logged in the Health Reports section of Central Administration:

“Verify that the critical User Profile Application and User Profile Proxy Application timer jobs are available and have not been mistakenly deleted”

Cause: This error is thrown due to a flaw in the logic of the owning health rule.

Resolution: Microsoft acknowledges that there is a flaw in the health rule logic and will resolve this issue in an upcoming CU. In the meantime, this error can be ignored.

Reference: http://support.microsoft.com/kb/2622705

August 2011 Cumulative Updates


 August 2011 Cumulative Updates  for SharePoint 2007/2010

 
Please note that  SharePoint Server 2010 CU contains the SharePoint Foundation CU. And the SharePoint Server 2010 with Project Server CU contains Project Server CU, SharePoint Server CU and SharePoint Foundation CU.
That means only one package has to be installed for the SharePoint 2010 product family. 
 
 

Unable to open pdf attachments from SP2010 site?


By default SharePoint 2010 does not allow you to open PDF documents directly and you will get following message if you try to open the pdf documents from SP2010 directly:

why?

In Internet Explorer 8 Microsoft added a security feature to prevent script injection vulnerabilities caused by buggy client software. This feature is activated by a new HTTP header called X-Download-Options which can be set to noopen. When that header is passed with a file attachment Internet Explorer 8 will not provide the option to directly open the file, instead you must first save the file locally and then open it.
SharePoint 2010 utilizes this enhanced security feature in IE 8 to block the opening of file types it considers vulnerable to scripting or other attacks, such as PDFs.

Workaround: (This these changes only if it is really required as it adds security risk to the environment)

  • Go to SharePoint 2010 Central Administration > Application Management > Manage Web Applications
  • Select the row of your web application
  • Click General Settings in the ribbon
  • Scroll down to Browser File Handling and select Permissive
  • Click Ok

Preupgradecheck errors -Part -2


The following feature(s) are referenced by the content, but they are not installed on the web server

 Name = Unknown, Feature id = GUID, Reference count = 1, Scope = Web, Status = Missing             
 Name = Unknown, Feature id = GUID, Reference count = 2, Scope = Web, Status = Missing             
 Name = Unknown, Feature id = GUID, Reference count = 1, Scope = Web, Status = Missing            

Steps to fix the errors

    1st Method

1. Download Feature Admin tool from http://featureadmin.codeplex.com/
2. Run the exe and click “Find faulty features” in the farm which will detect the faulty features now remove the faulty feature by using “Remove Feature from farm” option.

    2nd method

1.From the PreUpgradeCheck report note the feature GUID
2. Run following query on DBs (Content db and central admin db) to verify that the feature exists on Central Admin DB

SELECT * FROM FEATURES WITH(NOLOCK) WHERE FEATUREID=’GUID’

This query will display WebId , SiteId and other details about the feature.
3. Run

STSADM -o deactivatefeature -id GUID -force            

4. Download the utility WssRemoveFeatureFromSite from http://code.msdn.microsoft.com/WssRemoveFeatureFrom
5. Go to command prompt and point to WSSRemoveFeatureSite directory and type:
WssRemoveFeatureFromSite -scope (site|sitecollection) -url -featureid -force

HTTP Error 500.19 – Internal Server Error after installing Office Web Application


Recently i installed Office Web apps and once i completed the configuration , i noticed that i was getting error on all the site collections on the farm:

It appered that Office web Apps installation messed up the web.config files and problem was resolved by manually removing the following duplicate enteries from the web.config files:

<staticContent>            
      <mimeMap fileExtension=".atomsvc" mimeType="application/atomsvc+xml" />            
      <remove fileExtension=".svg" />            
      <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />            
    </staticContent>            
    <staticContent />            
  </system.webServer>

Powershell Script to enable/disable Blob Caching on SharePoint 2010 Farm


# Enable-SPBlobCache Function            
function Enable-SPBlobCache {             
param(             
                [Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)]            
                [Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind]             
                $WebApplication,            
                [Parameter(Mandatory=$false, ValueFromPipeline=$true, Position=1)]            
                $BlobCacheLocation="E:\BlobCache\"            
)             
            
process {             
    $WebApp = $WebApplication.Read()             
    # SPWebConfigModification to enable BlobCache             
    $configMod1 = New-Object Microsoft.SharePoint.Administration.SPWebConfigModification             
    $configMod1.Path = "configuration/SharePoint/BlobCache"             
    $configMod1.Name = "enabled"             
    $configMod1.Sequence = 0             
    $configMod1.Owner = "BlobCacheMod"             
    ## SPWebConfigModificationType.EnsureChildNode -> 0             
    ## SPWebConfigModificationType.EnsureAttribute -> 1             
    ## SPWebConfigModificationType.EnsureSection -> 2             
    $configMod1.Type = 1             
    $configMod1.Value = "true"            
                                            
    ######################################################################            
                            
                # SPWebConfigModification to enable client-side Blob caching (max-age)             
    $configMod2 = New-Object Microsoft.SharePoint.Administration.SPWebConfigModification             
    $configMod2.Path = "configuration/SharePoint/BlobCache"             
    $configMod2.Name = "max-age"             
    $configMod2.Sequence = 0             
    $configMod2.Owner = "BlobCacheMod"             
    ## SPWebConfigModificationType.EnsureChildNode -> 0             
    ## SPWebConfigModificationType.EnsureAttribute -> 1             
    ## SPWebConfigModificationType.EnsureSection -> 2             
    $configMod2.Type = 1             
    $configMod2.Value = "86400"             
                            
                ######################################################################            
                            
                # SPWebConfigModification to change the default location for the Blob Cache files            
                $configMod3 = New-Object Microsoft.SharePoint.Administration.SPWebConfigModification            
                $configMod3.Path = "configuration/SharePoint/BlobCache"            
                $configMod3.Name = "location"            
                $configMod3.Sequence = "0"            
                $configMod3.Owner = "BlobCacheMod"            
                ## SPWebConfigModificationType.EnsureChildNode -> 0             
    ## SPWebConfigModificationType.EnsureAttribute -> 1             
    ## SPWebConfigModificationType.EnsureSection -> 2             
                $configMod3.Type = 1            
                $configMod3.Value = $BlobCacheLocation            
    # Add mods, update, and apply             
    $WebApp.WebConfigModifications.Add( $configMod1 )             
    $WebApp.WebConfigModifications.Add( $configMod2 )            
                $WebApp.WebConfigModifications.Add( $configMod3 )            
    $WebApp.Update()             
    $WebApp.Parent.ApplyWebConfigModifications()             
}             
}            
            
            
            
# Disable-SPBlobCache Function            
function Disable-SPBlobCache {             
param(             
    [Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)]             
    [Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind]             
    $WebApplication             
)             
            
process {             
    $WebApp = $WebApplication.Read()             
    $mods = @()             
    foreach ( $mod in $WebApp.WebConfigModifications ) {             
        if ( $mod.Owner -eq "BlobCacheMod" ) {             
            $mods += $mod             
        }             
}             
    foreach ( $mod in $mods ) {             
        [void] $WebApp.WebConfigModifications.Remove( $mod )             
    }             
    $WebApp.Update()             
    $WebApp.Parent.ApplyWebConfigModifications()             
}             
}            

Working of the Script:

  1. Copy Blobcache.ps1 to local drive on Sharepoint server or on a file share
  2. This script is using Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind  class of Microsoft.SharePoint.PowerShell assembly so we need to make sure we add the reference in PS by running command

Add-PSSnapin Microsoft.SharePoint.PowerShell

  1. Set the executionpolicy to unrestricted
  2. Run the script (Dot source it) – type a period and a blank space and then type the path to the script file (see the screenshot)
  3. Execute Enable-SPblobcache function to enable blobcaching, supply the webapplication name on the prompt
  4. To disable execute Disable-SPblobcache

**Location of Blobcache folder, max age etc can be changed from the script itself.

** If you enable blob caching using Enable-SPblobcache function then be sure to disable it using Disable-SPblobcache function (dont do it manually).