This project is read-only.

WebConfigModifications not persisted


fmorisso submitted this change in your discussion list, but I wanted to bring it to your attention since it has not yet made it into the code base:
   public override void FeatureActivated(SPFeatureReceiverProperties properties)
        SPWebApplication webApp = properties.Feature.Parent as SPWebApplication;
        if (webApp != null)
            webApp.Update(); // This line need to be added in order for the modifications to be correctly propagated
The webApp.Update() method call needs to be added to the Deactivate method as well.
I have tested the original code in a multi-wweb front end environment and the web.config changes would not propagate to the app server, and web front ends.
After applying the previously mentioned changes, the web config changes are properly added and removed when activating and deactivating the feature.
Thanks for the hard work on this project!

file attachments


redoz wrote Nov 4, 2010 at 10:09 AM

I've attached a patch that works against the latest source

wrote Feb 13, 2013 at 4:24 AM