Specifically, if my code makes a change to the web.config to enable the ScriptResource.axd HttpHandler, and then another third party app comes along and also 'adds' the config entry (it doesn't add a duplicate, but if my code wasn't there before it would have added the entry), and then my feature is deactivated, how does (or does) SP know that other features also need that entry to even though my feature wants to remove the HttpHandler from the web.config?
I am using SPWebConfigModification to made my config file edits, and it works just fine when my code is all on its lonesome, but I noticed the other day that another third party is also using the ScriptResource.axd and when our feature (web app scoped) is deactivated the resource entry is removed, breaking the other party. I have deployed this solution to several dozen other farms and this entry was remembered/left alone but for this one farm is not. Could I make edits to the web.config.old files to maybe get SP to remember that other features also need the entry?
I am toying with the idea of changing my web app feature to not auto activate so I can at least have some guarantee for our customers that we won't break their other tools, but there are tons of dependencies on the stuff this feature does so I am not looking forward to all the regression testing...