I have several features which are deploying web parts into a given site sollection.
The WSPs were built using the WSPBuilder add-in to Visual Studio 2008.
Although the SafeControls entry is always created in the manifest.xml it is not always added to the web.config on deployment. I beleive this may be due to the fact that I have included references to a helper.dll which in turn references Microsoft.SharePoint.dll, but I have no hard information to confirm this.
So...
I have included a FeatureReceiver on each feature which is creating the SafeControl entry instead.
However every time the Feature is activated a new safe control entry is added, so I would like to check if it already exists before adding it. I assume this is a function of the SPWebService class as per SPWebConfigModifications?
Help is as always appreciated.