Monday, August 10, 2009

Exception 0x80020009 while activating sharepoint Publishing infrastructure feature

I had some issues while activating publishing feature for sharepoint. Found this issue was common for many users. This issue was solved using the command line tool STSADM


stsadm -o activatefeature -filename publishing\feature.xml -url http://serverURL -force
stsadm -o activatefeature -filename publishingresources\feature.xml -url http://serverURL -force

stsadm -o activatefeature -filename publishingSite\feature.xml -url http://serverURL -force

stsadm -o activatefeature -filename publishingweb\feature.xml -url http://serverURL -force

stsadm -o activatefeature -filename publishinglayouts\feature.xml -url http://serverURL -force

stsadm -o activatefeature -filename navigation\feature.xml -url http://serverURL -force

then do an IISRESET

1 comment:

Unknown said...

SPUser user = SPContext.Current.Web.AllUsers[@"DOMAIN\LOGINNAME"];
SPUserToken token = user.UserToken;
using (SPSite site = new SPSite(SPContext.Current.Site.Url,token))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["YourList"];
list.Items[0]["Title"] = "Your new title";
list.Items[0].Update();
}
}