Where do Custom Channel Properties go while migrating MCMS site to MOSS 2007?
I am not sure if it’s a widely known fact among those who know about MCMS to MOSS migration more than I do.
But still, for self-appeasement I will post what I found
I created two properties (one Text and another Selection) in the ‘About Us’ channel of a default WoodGrooveNet installation :
After migrating it to MOSS, both these properties will be available in the Property Bag of the Site :
I tested below code to extract all of the properties. Do note that I used SPWeb.AllProperties (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.allproperties.aspx) and not SPWeb.Properties(http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.properties.aspx)
static void Main(string args)
Console.WriteLine("--- Enter Site Collection Url----");
SPSite oSite = new SPSite(Console.ReadLine());
foreach(SPWeb oWeb in oSite.AllWebs)
Hashtable oTbl = oWeb.AllProperties;
foreach(string key in oTbl.Keys)
Console.WriteLine("Key : " + key + "--Value :" + oTbl[key].ToString());
Console.WriteLine("Enter any Key to Exit");
Here they all are :
SPWeb.Properties only returns property of type ‘Selection’ and not of type ‘Text’. Well, not sure why? but a blanket explanation could be that Properties (which is a SPPropertyBag) actually returns a subset of AllProperties. (which is a hashtable).
I also noted that SPWeb.Properties doesn’t support case-sensitive keys – that and the reason above makes AllProperties a better place to store custom properties meant to be utilised in code, such as FeatureRecievers,Webparts, EventHandlers etc.
BTW, One can also check these properties through SharePoint Designer. When you open the site in SPD, SPWeb properties are available at Site -> Site Settings - Parameters tab .
Hope someone finds the info useful