I am developing a solution for SharePoint 2010 SP1. My solution provides several timer jobs, which are instantiated using a feature and a feature receiver.
The feature is scoped to a WebApplication, which seemed natural since the timer jobs are associated with the same web application. The solution is also a full-trust solution.
The solution deploys to a specific web application (http://portal.xyz.net), and only to that web application; however, it appears that the feature gets activated on all web applications within the farm, except Central Administration. As a result, the timer job gets created on all web applications.
This causes failures in some cases, and redundant code execution in others. What I really want is for the feature to activate only on the web application to which I deploy the solution.
Any ideas on how I can configure this properly?
Update 1
We have tried deploying the solution three ways, all with the same behavior:
- Using Visual Studio
- Using the Central Administration web application
Using the following PowerShell command:
Add-SPSolution -LiteralPath C:\Nu.SharePoint.Portal.wsp Install-SPSolution -Identity Nu.SharePoint.Portal.wsp -GACDeployment -WebApplication http://portal
After the deploy step in any case, we see the solution deployed to the single web application, but the WebApplication-scoped features are activated on all web applications except central admin. The behavior we want is to activate these features only on the application that we deploy to.