EDIT to add more detail about what I'm trying to do:
This is the first SP project I've worked on, so I might be making a very basic mistake with how the project is set up. The project consists of a custom list for configuration data, which is modified via two custom application pages. There are also a couple of other application pages for custom functionality accessible by any user. There are also a couple of web services through which an outside website will access the data from that custom functionality.
The production web application contains a single site collection with multiple sites. Each element of the project should be installed to every site within that site collection, so the application pages and web services on each site are specific to that site only.
END EDIT
I have a SharePoint solution within VS which contains two custom web services, several application pages, and a feature event handler. I'd like the feature to be available in every sub site within a site collection, with different data for each. My single feature is scoped to Site, and iterates through each web within the site collection in the FeatureActivated event to perform certain processing (adding of menu items linked to the application pages). The feature contains the two web services, but there's no option to include the application pages as "items in the solution".
The entire solution works fine when I deploy through Visual Studio. However, this was on a development machine and I now need to move to test. My understanding is that I should be able to do this using the WSP file through Powershell and/or Central Admin. This is where I'm running into issues.
Running Add-SPSolution
works just fine (Add-SPSolution "C:\featurepackage.wsp"
), but Install-SPSolution
(Install-SPSolution -Identity FeaturePackage.wsp -WebApplication http:// nameofserver -GacDeployment
) gives me an error on scope - there are no web application scoped items. Which makes sense, since my feature is Site scoped. I couldn't find any information on PS commands to install a solution that is Site scoped.
After some searching, I figured out that the solution was listed in the Farm solutions page of Central Admin. The only options I was given were to deploy it globally. On test and prod, there's only a single web application, so although I would've preferred to deploy just to the single web application which contains my site collection, that would work.
I received no errors once I'd deployed through Farm Solution Management, but when I checked the site settings for any of the sites (one menu inserted during feature activation is under site settings), there were no new menu options. I also get a 503 (service unavailable) error when trying to go directly to one of the new application pages. So it doesn't seem to actually be deployed. Am I missing a step here, or completely off-target? Any help would be very much appreciated.
Here's the solution screenshot:
Here is the manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/" SolutionId="4e02717b-9a15-4a9c-9e05-a7575163aeca" SharePointProductVersion="14.0">
<Assemblies>
<Assembly Location="Newtonsoft.Json.dll" DeploymentTarget="GlobalAssemblyCache" />
<Assembly Location="Feature.dll" DeploymentTarget="GlobalAssemblyCache" />
</Assemblies>
<RootFiles>
<RootFile Location="ISAPI\WebService1.svc" />
<RootFile Location="ISAPI\WebService2.svc" />
<RootFile Location="ISAPI\WebService3.svc" />
</RootFiles>
<TemplateFiles>
<TemplateFile Location="Layouts\Config\Configuration.aspx" />
<TemplateFile Location="Layouts\Config\Mappings.aspx" />
<TemplateFile Location="Layouts\Feature\script.js" />
<TemplateFile Location="Layouts\Feature\Add.aspx" />
<TemplateFile Location="Layouts\Feature\View.aspx" />
</TemplateFiles>
<FeatureManifests>
<FeatureManifest Location="Feature_Configuration\Feature.xml" />
</FeatureManifests>
</Solution>
And Feature.xml:
<?xml version="1.0" encoding="utf-8"?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" AutoActivateInCentralAdmin="TRUE" Description="Adds custom content in order to configure Feature" Id="4bd05979-61b2-4ca1-8f4f-ac929816cbeb" ReceiverAssembly="Feature, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6bf86656d0472a39" ReceiverClass="Feature.Features.Configuration.ConfigurationEventReceiver" Scope="Site" Title="Configuration"></Feature>