I am trying to activate a sharepoint feature in 2010. When I try to activate it I reaceive the "Access Denied" error message. I am an admin on the server and a site admin on the site I'm trying to activate the feature on. In the event viewer the following error shows up:

Log Name: Application Source: Microsoft-SharePoint Products-SharePoint Foundation Date: 1/30/2011 10:41:11 PM Event ID: 6615 Task Category: Runtime Level: Error Keywords:
User: mmurphy Computer: SPS1.xx.com Description: Access denied. Event Xml: 6615 14 2 10 0 0x4000000000000000 2364 Application SPS1.**.com Access denied.

Any ideas?


  • What does the feature do?
    – James Love
    Jan 31, 2011 at 8:19
  • ...and does it have feature activation code? Also you should receive a correlation id when your activation fails, please check that id against the ULS trace log Jan 31, 2011 at 11:41
  • The features that are having the problem are trying to access the web.config file. As a work around, I commented that code out and manually updated the web.config. However, I would like to know what permissions are required in order to update the web.config file while deploying a feature?
    – mikemurf22
    Feb 1, 2011 at 19:05

4 Answers 4


In order to make modifications to the web.config you have to be a farm administrator. When you inspect the ULS log you will find a few lines above 'Access Denied' the message: "The SPPersistedObject, SPWebService, could not be updated because the current user is not a Farm Administrator"

When you ARE a farm administrator and still getting this message, running Paul's script can do the trick, you can find it here: http://unclepaul84.blogspot.com/2010/06/sppersistedobject-xxxxxxxxxxx-could-not.html

Please run the script from PowerShell. The script turns off remote administration security: Microsoft.SharePoint.Administration.SPWebService.ContentService.RemoteAdministratorAccessDenied

You have to be careful when manually editing the web.config file. The added keys are not stored in the database and when the web.config is built again from the database the keys can(read: will be) be gone. I experienced that myself unfortunately.

Regards, Anita


i am getting this same error but my feature does not modify the web.config file. I have also tried the script to turn off the remote admin setting and that also does not work. My .wsp is 3 projects that all depend on one another... a web application for accessing a remote url, a sharepoint project with code for a custom claims provider, and another SP project which is nothing more than a feature to implement the above-mentioned claims provider. If i deploy this as a farm solution, it deploys and activates automatically and works fine. If I deploy it as a site solution, it will deploy but throws this error during activation. Any ideas?


This is because of a new feature in SharePoint 2010, where it explicitly blocks any modification which is from SPPersistedObject in the Microsoft.SharePoint.Administration namespace. To avoid this we can write a piece of code to disable the same and enable it back after deploying the feature.

 SPWebService myService = SPWebService.ContentService;
 myService.RemoteAdministratorAccessDenied = false;
 //your code goes here
 myService.RemoteAdministratorAccessDenied = true;
  • just to note if your getting that warning already then you cannot set RemoteAdministratorAccessDenied as you still dont have access ;) nice try tho :)
    – Ali Jafer
    Nov 20, 2013 at 11:02

pasting the content from the blogspot.in site ** **credit goes to Anita

"The SPPersistedObject, XXXXXXXXXXX, could not be updated because the current user is not a Farm Administrator" craziness in Sharepoint 2010 After upgrading from SharePoint 2007 to 2010 we noticed that our custom job scheduler web part started throwing the following error:

"The SPPersistedObject, Microsoft.SharePoint.Administration.SPJobDefinition, could not be updated because the current user is not a Farm Administrator".

Since we were running the SPJobDefinition.Update() and related code under SPSecurity.RunWithElevatedPrivileges() I was under the impression that the code already ran as Farm Admin. After banging my head against the wall for a couple hours with no solution I decided to whip out my most trusted tool - Red Gate's Reflector - it never failed me before. Upon detailed investigation of Microsoft.SharePoint.dll I discovered that SharePoint guys added a new security feature to all objects inheriting from SPPersistedObject in the Microsoft.SharePoint.Administration namespace. This feature explicitly disallows modification of the above stated objects from content web applications, which is where our web part is running. The error message thrown is therefore very misleading. After some more tracing through the code I found a property in SharePoint API which controls this behavior:


After setting this property from PowerShell the issue went away with no code changes. The script I used is attached to this post.

    function Set-RemoteAdministratorAccessDenied-False()
      > $null
      SharePoint.Administration") > $null

     # get content web service
     $contentService = 
    # turn off remote administration security
    $contentService.RemoteAdministratorAccessDenied = $false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.