Tuesday, October 29, 2013

Access denied when deploying a timer Job or activating a feature from SharePoint 2010

Issue: You might get access denied error message in event  log while activating timer job at site collection level

Cause: This is due to a new security feature implemented in SharePoint 2010. This feature explicitly blocks any modifications to the objects inheriting from SPPersistedObject in the Microsoft.SharePoint.

Resolution: Run below powershell script:
function Set-RemoteAdministratorAccessDenied-False()
{
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") > $null

    # get content web service
    $contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
    # turn off remote administration security
    $contentService.RemoteAdministratorAccessDenied = $false
   $contentService.Update()        
}

Set-RemoteAdministratorAccessDenied-False


Reference link: http://support.microsoft.com/kb/2564009

Thursday, October 24, 2013

Contribute user unable to upload specific files in SharePoint 2010

Users with contributor permissions are prevented from uploading files with the following extensions:
  • ASPX
  • MASTER
  • XAP
  • SWF
  • JAR
  • ASMX
  • ASCX
  • XSN
  • XSF

A user with contributor rights trying to upload a file with any of the above mentioned extensions will generate a modal dialog "Error: Access Denied" appears. User cannot upload the .SWF file".

Users with designer permissions can upload SWF files successfully in SharePoint 2010. More precisely, the "Add and Customize Pages" permission is required.

Users with contributor permissions could upload SWF files in WSS 3.0 or MOSS 2007.

In Sharepoint 2010, SWF is not by default in the "Blocked File Types" list of a web application but instead has been added to a list of web files considered as web sensitive. These files are listed in the WebFileExtensions property of the WebApplication. The WebFileExtensions property can be programmatically edited, for example using powershell. See WebFileExtensions for more details.

Update alerts after DB migration in SharePoint 2010

It is recommended to again set alerts if DB is attached from one web application to other.
In this scenario existing alerts will send URL of old web application