Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am getting a SecurityException while trying to activate a feature with a custom timer job. The error is raised from the job.Update() method call. I am running the code with Farm Admin account.

Do you have any idea?

share|improve this question
1  
To confirm, you are registering the job as part of a feature receiver and activating the feature through CA logged in as the Farm Admin, correct? –  Mike Oryszak Dec 4 '11 at 17:50

2 Answers 2

Try to override the SPPersistedObject.HasAdditionalUpdateAccess() method and return true.

protected override bool HasAdditionalUpdateAccess()
{
  return true;
}
share|improve this answer

This thread for you. Your application pool identity will not have the appropriate rights. This thread contains full information how to resolve this issue.

share|improve this answer
    
I think the thread doesn't apply to my problem. Because I am trying to install the timer job with the Farm Administrator account which already has full access to both Content DB and SharePoint API. –  Élodie Petit Dec 4 '11 at 12:08
    
But you try to execute your code from frontend role. In this case your permissions are reduced by security reasons. –  Alexander Dec 4 '11 at 12:10

Your Answer

 
discard

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.