2

I am currently in the process of documenting some development best practises in advance of beginning dev on SP2010.

One issue we have at present is that we make changes to web.config files manually. These changes sometimes differ between Web apps based on what "features" a customer is licensed to use (not SharePoint features - this relates to our product).

I have read on MSDN that the best method of applying web.config changes is to either create a supplemental .config file or to apply the changes using the object model.

2 questions really:

  1. Which option would you suggest and,
  2. Is there a way of applying these changes on a per Web app basis, e.g. through the use of a solution package deployed selectively?

Thanks in advance, Ben.

4

Use the object model (SPWebconfigModification), it applies the changes to all the web front ends of the specific web app you're working with.

  • I think sharepointchick.com has something to add on the topic. Mirjam van Olst included a recommendation to avoid SPWebConfigModification in certain situations in her presentation for Developer Connections Amstredam. Would be great to have that opinion here as well. – Alexey Krasheninnikov Dec 23 '10 at 3:38

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.