Saturday 5 July 2014

"Scope" of SharePoint Features


Web Site scoped Feature (Scope="Web"):
A Web Site scoped Feature is one that can be activated only at the individual Web site level. List templates, list instances, custom actions, event receivers, etc are the some common elements for web site scoped features. Web Site scoped features can be activated by using one of the following two methods:
Run the following STSADM command:
stsadm -o installfeature -name FeatureFolderName –url http://servername/site/subsite
Open the Site Features page in the SharePoint site (Site Actions -> Site Settings -> Modify All Site Settings -> Site Features) and click the Activate button.
Site Collection scoped Feature (Scope="Site"):
A Site Collection scoped Feature is one that can be activated at the site collection level and contains items that apply to the site collection as a whole (for example, content types that are shared across the site collection), as well as items that can be activated per site (for example, list instances, etc). Site Collection scoped features can be activated by using one of the following two methods:
Run the following STSADM command:
stsadm -o installfeature -name FeatureFolderName –url http://servername/site/sitecollection
Open the Site Features page in the SharePoint site (Site Actions -> Site Settings -> Modify All Site Settings -> Site Collection Features) and click the Activate button.
Web Application scoped Feature (Scope="WebApplication"):
A Web Application scoped Feature is one that can be activated at the web application level and contains items like administrative web application links, delegate control registrations, feature/site template association, document form registrations, etc. A farm Feature can contain, for example, links to /_layouts pages and files, /_admin pages, and other elements. Web Applicationscoped features can be activated by using one of the following two methods:
Run the following STSADM command:
stsadm -o installfeature -name FeatureFolderName -url http://servername
Open the "Manage Web Application Features" page in the Central Admin application (SharePoint Central Administration -> Application Management -> Manage Web Application Features) and click the Activate button.
Farm scoped Feature (Scope="Farm"):
A Farm scoped Feature can be activated at the server farm level. A farm Feature contains a number of elements that are critical for implementing applications and logic anywhere within a deployment. A farm Feature can contain, for example, links to /_layouts pages and files, /_admin pages, and other elements. Farm scoped features can be activated by using one of the following two methods:
Run the following STSADM command:
stsadm -o installfeature -name FeatureFolderName
Open the "Manage Farm Features" page in the Central Admin application (SharePoint Central Administration -> Operations -> Manage Farm Features) and click the Activate button.