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

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

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

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