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

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
    
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
add comment

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.