.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Deploying a Feature Stapler for a specific Web App

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :SharePoint
I'm trying to write a very simple feature stapler scoped to the web app level. I can write it. I can deploy it as a farm solution. But, I can't get it to deploy to the web app level. If I run install-SPSolution with the -WebApplication parameter, I get the error "This solution contains no resources scoped for a Web Application and cannot be deployed to a particular web application." Here's the feature.xml - which says it's scoped to the webapplication: <?xml version="1.0" encoding="utf-8"?> <Feature xmlns="http://schemas.microsoft.com/sharepoint/" Id="5603ccd0-4d95-4250-890f-318d433d3a9a" Scope="WebApplication" Title="cets_ws_master_stapler"> <ElementManifests> <ElementManifest Location="stapler\Elements.xml" /> </ElementManifests> </Feature> What am I doing wrong? The feature it should staple is only relevant to a particular web app, so I really _can't_ let it deploy to the whole farm.

View Complete Post

More Related Resource Links

OLE DB Error: Network-Related or Instance-Specific while Deploying SSAS 2008 Cube

Hi, I encountered the below listed error while attempting to deploy SSAS 2008 DB: Error 1 OLE DB error: OLE DB or ODBC error: Login timeout expired; HYT00; A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.; 08001; Named Pipes Provider: Could not open a connection to SQL Server [5]. ; 08001.  0 0  I am running a standalone MSSQL 2008 named instance on Windows Server 2008 R2. Here are the steps I have taken but yet the issue is not resolve: 1) Enable Remote connections on the server 2) Enable TCP\IP 3) SQL Browser is Running 4) Set Firewall Inbound Exceptions for SQL Browser, Default Port 1433, UDP Port 1434 5) Using Management Studio I can successfully connect to the MSSQL named instance from the app server 6) I can ping I MSSQL box from the app server 7) Read and implemented all steps in the MSDN post below: http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx Thanks for your help.

Deploying features to a specific sub-site

Hi all, I have a Root Site collection, and it has various sub sites, I have a couple of lists and content types that are specific to some sub sites, and the client doesn't want these lists and content types viewable across the company so it makes sense that these are deployed to their respective sub sites only so that they are not available at the root level. I know if you go through the Site Settings for the sub sites, you can create content types and lists that are only available in that site, but I am battling to deploy these content type & lists to their specific sub-sites though Visual Studio 2010, does anyone know how to do this?

Feature with wsp for creating specific groups on any site creation

hi, i need to create a sharepoint feature for wss 3.0 with .wsp (wsp for easy deployment) which do folowing funtionality: Ability to run some custom code for creating specific custom groups on every site creation. Feature needs to be activated when deployed so when user create new site it creates groups based on our custom code( i have custom code for creating gorups just need to know how to attached it to feature which works on every site creation event) Any workable example is very helpful for me because i am very confuse and already did reasearch on that. i guess feature stapling is not the solution in my case. Thanks in advanced shaheen

Error deploying workflow feature in VS 2010


Hi all,

I have a VS 2010 state machine workflow solution, and am getting errors deploying the feature.  It is a 2 part question:

1. The error is: "Error occurred in deployment step 'Activate Features': Feature with Id '8ebb19f1-c0cc-49be-9d48-f56d0c0cfdf8' is not installed in this farm, and cannot be added to this scope."  Here is my feature:

<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="E7A6A9DB-FAA5-430E-8380-1C60A372879B" Scope="Site"
 ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" 
 ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver" >
 <Property Key="GloballyAvailable" Value="true" />
 <Property Key="RegisterForms" Value="*.xsn"/>
 <ElementFile Location="ApprovalFormWComments.xsn" /> 

I added in the feature Id attribute just to try to resolve the error, but that didn't help as VS adds in the ID and scope automatically based on your settings in the feature designer window.

2. If you noti

Deploying the feature to a site (not globally) using WSPBuilder



    I have developed an event handler for the task list as a feature, which overrides the ItemAdding,ItemDeleting and ItemUpdating event.
 I have even deployed the same on the server using the  WSPBuilder.

In the process of using the WSPBuilders, on creating the deployment folder I got a folder called "deploy"  in the "bin" folder.The deploy folder contains a folder, which again contains the deployment files like deploywithstsadm.bat, deploywithstsadmnocontenturls.bat, deploywithwspbuilder.bat  ......

For my project i used the deploywithstsadmnocontenturls.bat file, and deployed it. It gets deployed sucessfully.

The problem here is that the feature is getting deployed "Globally", how can i deploy it to a particular site like "ww.testsharepoint.com". ??????


With regards

Biju Software Engineer,MCP

Deploying the Feature problem



I'm relatively new in VS/MOSS developing, XML and so on.

Now the problem:

Trying to deploy created feature in VS2010 (right clicking on the feature and selecting Deploy), I'm getting next error message:

Error occurred in deployment step 'Add Solution': Error: Cannot find this file specified in the manifest file: FMCGContentTypesFields_FMCGContentTypes\ContentTypes\FMCGFields.xml.

FMCGContentTypesFields - Project Name

FMCGContentTypes - Feature Name

ContentTypes - Module Name

Feature definition file is below:

<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
         Title="FMCG Custom Content Definistions"
    <Property Key="GloballyAvailable" Value="true" />
    <ElementManifest Location="FMCGFields.xml"/>

Deploying only specific components of an analysis project



I have an analysis project in Visual Studio and I was wondering if it's possible to deploy only parts of it to the server because there are parts that I don't want to be overridden, for example partitions.



Using SharePoint Search feature in ASP.Net Application

Integrating ASP.Net application in to MOSS 2007 to utilize SharePoint Enterprise Search Feature can be done by using Business Data Search.

Button specific code


I have 2 submit buttons on my page. Right now, the only way to run the code behind with razor is to to If(IsPost). Since I have 2 buttons, how would I destinguish between the two in post? Is there a way to request a button that sent a post request?  

deploying to msdeploy does not support a proxy server


I am trying to deploy through webmatrix but my system Proxy server configuration is not being used. I assume that webmatrix would detect the proxy server settings and use that for the msdeploy calls under the hood. Can anyone confirm this is a know issue? 

Getting list of users reporting from specific Manager from Active Directory


Dear All,

I am have requirement like displaying all the user information reporting to specific manager from Active Directory.

Please help me regarding this.



Create web site specific to mobile device, how to detect?



I have a website that is written in .Net 2.0 which uses all the nice rich functionality of the web (Ajax, javascript etc..).  However I have noticed that the site does not display very well on mobile devices. 

So therefore I would like to create a more streamlined version of my site that is better tailored to these devices.  However how do detect that the user has come to the site via a mobile device and how can i redirect them to my tailored page

Many thanks in advance

May i use the collapse and expand feature (like tree menu) in Report ?


HI all,

May i use the collapse and expand feature (like tree menu) at Report iam using the Report viewer  Control for displaying the Report on my Asp.net Page .


I have number records and each record have detail as i clicked or expand the record then details will be shown is it possible with report viewer control 
If any one have experince before please share the ideas.


Best Regards

Windows Azure: Developing and Deploying Cloud Apps in Visual Studio 2010


You'll find direct support for building Windows Azure applications in Visual Studio 2010 and Visual Web Developer 2010 Express. We'll walk you through using Visual Studio 2010 for the entirety of the Windows Azure application development lifecycle.

Jim Nakashima

MSDN Magazine April 2010

Cloud Patterns: Designing and Deploying Services for Windows Azure


To better understand how SOA patterns can be applied to Windows Azure deployments, we walk you through a scenario in which a bank moves its services to the cloud.

Thomas Erl, Arman Kurtagic, Herbjörn Wilhelmsen

MSDN Magazine January 2010

Patterns in Practice: Internal Domain Specific Languages


Jeremy Miller explains how internal Domain Specific Languages can help you craft code that is easier to read and write. His bag of tricks to improve your programming includes extension methods, fluent interfaces, object extensions and use of the semantic model.

Jeremy Miller

MSDN Magazine January 2010

SharePoint's Sandbox: Developing, Deploying and Monitoring Sandboxed Solutions in SharePoint 2010


The challenge in SharePoint development has always been the balance between creating and deploying solutions that you can trust not to damage or impair a SharePoint farm. A new feature in SharePoint 2010, called Sandboxed Solutions, enables farm administrators to feel comfortable that the SharePoint farm is safe, gives site collection administrators the authority to manage applications in their site collection, and provides developers with the flexibility to create solutions they know will be deployed in a safe and rapid manner.

Paul Stubbs

MSDN Magazine November 2009

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend