SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: Description: Access denied. Event Xml: 6615 14 2 10 0 0x4000000000000000 2364 Application SPS1.**.com Access denied.

Any ideas?


share|improve this question
What does the feature do? – James Love Jan 31 '11 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 – Anders Rask Jan 31 '11 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 '11 at 19:05
up vote 5 down vote accepted

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:

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

share|improve this answer
Hi Mike, This is a very interesting topic and I had to write about it, you can find it here: Please read the 'Serious considerations' part. Regards, Anita – Anita Boerboom Feb 2 '11 at 13:40
Great job figuring this out, Anita. I hit the exact same problem. – SPDoctor Feb 2 '12 at 20:15

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?

share|improve this answer

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;
share|improve this answer
just to note if your getting that warning already then you cannot set RemoteAdministratorAccessDenied as you still dont have access ;) nice try tho :) – ali Sharepoint Nov 20 '13 at 11:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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