I need to call a method from publishing.administration-Namespace as a farm admin. To be specific: ContentDeploymentJob.GetAllJobs();

When I try to run that code I get the exception that the code can only be run by farm administrators.

SPSecurity.RunWithElevatedPrivileges does not help. Also running under the System Accounts SPUserToken Like 'SPSite("myWebsite.com",SPUserToken.SystemAccount)' is of no help, because I am not in a SPSite-Context

Which ways are there to achieve that?

1 Answer 1


Meanwhile I found out that can not be done in a normal SiteCollection. You have to create a timerjob to read and start Content-Deployments and then communicate with you Site Collection

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.