Property bag
once downloaded run this powershell to install it
Add-SPSolution -LiteralPath C:\Users\YOURUSER\Downloads\PropertyBagSettings2010.wsp
Install-SPSolution -Identity PropertyBagSettings2010.wsp -GACDeployment
with your property bag installed navigate to your site setting and notice that under Site Administration there's a new link Property bag settings
when clicked on, this will let you view, add, edit, and remove different entries, try not to wreck anything.
now this is where we like to connection strings, generally we add them on feature activating
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
using (SPWeb currentWeb = ((SPSite)properties.Feature.Parent).RootWeb)
{
if (!currentWeb.AllProperties.ContainsKey("spm_ConnectionString"))
{
currentWeb.AllProperties["spm_ConnectionString"] = SPM_CONNECTIONSTRING;
currentWeb.Update();
currentWeb.Properties.Update();
}
}
}
and remove them on feature deactivating
public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
{
using (SPWeb currentWeb = ((SPSite)properties.Feature.Parent).RootWeb)
{
if (currentWeb.AllProperties.ContainsKey("spm_ConnectionString"))
{
currentWeb.AllProperties.Remove("spm_ConnectionString");
currentWeb.Update();
currentWeb.Properties.Update();
}
}
}
now keep in mind that SPM_CONNECTIONSTRING is just a constant string that as the name insinuates is a connection string.