1

I need to be able to modify, via C# in a SharePoint solution, the STS web.config across multiple servers. What is the proper way to do this since the WebConfigModificationn class doesn't take this web.config into account?

1

Timer job that is run once on feature activation. Chris Keyser has a post about updating settings on each server in a farm, and you can use that as a base for your code.

http://blogs.msdn.com/b/chriskeyser/archive/2010/12/20/using-a-sharepoint-timer-job-to-deploy-settings-in-a-farm-for-registering-event-sources.aspx

  • I've been thinking over this one, and I'm wondering if it wouldn't be a good idea to create a "STS sync"-type Timer Job. All changes made by the administrator would be stored in a config file that the STS sync would then execute and update the STS web.config for each server in the farm. It would periodically run to validate that the STS config was consistent. Only issue I'm having is how to properly identify the path to the STS web.config. I can hard code it, but that wouldn't be a good idea. – Trevor Seward Dec 10 '12 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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