Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3271990
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:46:54+00:00 2026-05-17T18:46:54+00:00

I’ve hosted an WCF service in SharePoint 2010 (basicHttpBinding) using this tutorial . The

  • 0

I’ve hosted an WCF service in SharePoint 2010 (basicHttpBinding) using this tutorial. The assembly is deployed to the GAC and contains the WCF service and a timerjob. Both call the same method. The timerjob works successful.

But when I call the method of the WCF service, I get an exception, that it can’t write a property in the SPFarm PropertyBag.

System.Security.SecurityException: Access denied.
   at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate()
   at Microsoft.SharePoint.Administration.SPFarm.Update()
   at MyCompany.MyProduct.Business.Config.SetPropertyValue(IPropertyBag propertyBag, String propertyName, String value)
The Zone of the assembly that failed was:
MyComputer

I tried to call the method using the Farm Administrator account and tried to use SPSecurity.RunWithElevatedPrivileges, but to no success.

I checked WindowsIdentity.GetCurrent() inside and outside the elevated privileges block, outside it’s the callers user and inside it’s the user of the WebApplications AppPool.

So the AppPool user is correctly impersonated, but SharePoint 2010 “disallows modification … to all objects inheriting from SPPersistedObject in the Microsoft.SharePoint.Administration namespace … from content web applications“

The article says, there is a switch SPWebService.ContentService.RemoteAdministratorAccessDenied (namespace Microsoft.SharePoint.Administration) to get rid of this behaviour, but I can’t rely on administrators to use this to get my solution running.

So I’m still without a solution

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:46:54+00:00Added an answer on May 17, 2026 at 6:46 pm

    I found a hack to work around the problem. I will not use it, because it is really dirty, but maybe somebody needs it, so:

    1. Don’t call the WCF Service by a normal web application URL. Use the URL of the Central Administration (e.g. http://myserver:9999/_vti_bin/project/myservice.svc)
    2. Run the part where you change the Farm Properties with elevated privileges (SPSecurity.RunWithElevatedPrivileges).
    3. Before the elevated part (now it gets really dirty) set System.Web.HttpContext.Current.Items["FormDigestValidated"] = true;

    As I said, not a nice one, but working …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.