1

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.

2 Answers 2

1

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/

1
  • Damn, this was supposed to be a comment, not an answer Commented Jul 9, 2012 at 11:10
2

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.

2
  • 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. Commented Jul 9, 2012 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. Commented Jul 9, 2012 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.