Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Issue

We currently have a deployment process which is partially automated and part manual. The manual part involves making manual changing to the web.config for some things. We have two load balanced front end web servers and therefore these are manually made on both as part of deployment.

Question

Is there anyway of automating this step so changes are replicated on both front end servers without manual intervention.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Yes. That code is run on each server. If you came along later and added a new server to the farm, that code (and, therefore, the Web.config change) would be run on the new server too. John is right, this is the mechanism you want to use. Note that you should also remove your web.config changes when the solution is uninstalled. http://www.novolocus.com/2009/12/24/adding-and-removing-web-config-modifications/

share|improve this answer
    
Thanks Andy & Jon will give this a go. –  Miyagi Jul 9 '12 at 10:40
    
Damn, this was supposed to be a comment, not an answer –  Andy Burns Jul 9 '12 at 11:10

http://msdn.microsoft.com/en-us/library/bb861909.aspx & http://msdn.microsoft.com/en-us/library/ms439965.aspx should help you. I beleive it is best practice not to edite the web.config files by hand.

share|improve this answer
    
John this code makes amendments to web.config however on automated deployments will this make changes to multiple webconfig files which are stored on different server? and what would happen in subsequent deployments. –  Miyagi Jul 9 '12 at 10:02
    
Should this be placed in the feature reciever or create a custom feature reciever for all web.config updates as we are using Sharepoint. –  Miyagi Jul 9 '12 at 10:56

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.