Using the PropertyBag

A nice feature of a SPWeb, SPSite or SPWebApplication is the Properties Property. You can save information to this Hashtable.

e.g. webApplication.Properties[“MyProperty”] = “5”;

After a change to the PropertyBag, you have to webApplication.Update() the changes. But here comes the problem. The account updating the Properties has to be a member of the “Farm Administrators” group to be able to save the changes to the SPWebApplication, because you change a SPPersistantObject of your farm!

Additionally the account needs rights to 4 stored procedures in your config Database, which might not be set.

Permission Stored Procedure Database Role EXECUTE proc_putObject WSS\_Content\_Application_Pools EXECUTE proc_putClass WSS\_Content\_Application_Pools EXECUTE proc_dropObject WSS\_Content\_Application_Pools EXECUTE proc_getNewObjects WSS\_Content\_Application_Pools


Technorati Tags: