Rule #42
Do you turn off auto activation on farm and web application scope features?
  v5.0 Posted at 20/10/2010 7:57 PM by system

Each SharePoint packages contains features that can be targetted at various scopes. 

You need to pay special attention when you are targetting the Web Application scope.

The feature XML looks like this.

<Feature Id="{GUID}" Title="WebApplicationConfiguration" Scope="WebApplication" Version="1.0.0.0" Hidden="FALSE" DefaultResourceFile="core" xmlns="http://schemas.microsoft.com/sharepoint/" >

  <ElementManifests />

</Feature>  

 

 

 But there is a problem...

The problem with this web application feature is that it will activate by default on All new Web Applications created on that farm, regardless of what the web application or root site template is.

The best practice is to make sure you use the additional attribute ActivateOnDefault and set it to False.  Then SharePoint administrators can choose to activate the feature after a new web application is created.
 <Feature Id="{GUID}" Title="WebApplicationConfiguration" Scope="WebApplication" Version="1.0.0.0" Hidden="FALSE" DefaultResourceFile="core" xmlns="http://schemas.microsoft.com/sharepoint/
ActivateOnDefault="False">

  <ElementManifests />

</Feature>