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 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?

share

1 Answer 1

up vote 0 down vote accepted

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

share

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .