开发者

SharePoint 2007: Activating feature through code not calling featureactivated event

I am trying to activate a SharePoint feature through code. SPWeb.Features.Add(new GUID("XXXXXX")

This above line is written in featureinstalled event handler where I am reading all the sites on the farm and activating the feature on each site.

But upon activation it is not calling / trigger the featureactivated event handler where I have some code t开发者_高级运维o run. Can someone suggest how to trigger that event.


Are you looking for Feature Stapling? http://blogs.msdn.com/b/cjohnson/archive/2006/11/01/feature-stapling-in-wss-v3.aspx Or is there a requirement that rules this out? Can your users create sites?

Also at what scope are you deploying the feature? If you scope it at farm or web application it will be activated/deactivated in all your sites.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜