In code utilizing SPWebConfigModification what would the typical reasons be for wanting to modify
Two examples I know of are: Adding a Safe control to the config, and making general changes to the appsettings section.
Are there more, if so, what?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
For me pretty much the only real need for web.config modifications are:
SafeControls should be set by a solution manifest on deployment to a webapp (WSPBuilder and Visual Studio for SP2010 add a SafeControl entry to the solution manifest automatically when needed).
I prefer to store AppSettings in the SPWebApplication's PropertyBag (or in the PropertyBag of say an SPSite.RootWeb, this way, if need be they can be changed using SharePoint Designer or changed using a custom Application Page (in Central Admin).
Furthermore, SP2010 has the SecureStore Service, which you can use to store user names, passwords and connection strings (pretty much any config value).
WCF services i usually deploy using
MultipleBaseAddressBasicHttpBindingServiceHostFactory (SOAP) or
MultipleBaseAddressWebServiceHostFactory (REST). This way SharePoint handles all settings like security endpoint etc.
You can pretty much do any modification that your application needs. The benefit of using that class is that it updates the web.config on all servers in your farm. Most common ones are: