I'm trying to write some automated scripts to update the web.config, is it possible?

1 Answer 1


Modification to the Web.config can best be done by using the SPWebConfigModification class in for example a feature activation event. This way you ensure that the modifications are done througout the whole farm.

SPMatt describes a nice example how this can be done.

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.