I have a question about using SPWebConfigModification along with FeatureReceiver to make a change to my SharePoint web application's web.config when my feature installs. I have a scenario where there is an element in my web.config that may or may not
exist. If it exists, it has an attribute with a value, and possibly child elements, e.g.:
If the element exists, I need to change the value "myvalue", otherwise I need to add the element itself. "mychild" child elements may or may not exist. When my feature is uninstalled, I need the web.config to revert back to exactly its original
state (restore the original value of "myvalue" and preserve "mychild" elements, if they existed previously, or remove the whole element if they did not).
Is this possible using the SPWebConfigModifications within the FeatureReceiver framework? If so, if someone could point me to a simple example, that would be perfect, as all of the examples I can find seem to be quite simple.
View Complete Post