Questions tagged [feature-receiver]

Defines methods that are called when a Feature is installed, uninstalled, activated, deactivated, or upgraded.

Filter by
Sorted by
Tagged with
0
votes
2answers
33 views

SharePoint C# Feature with http-Requests

I'm trying to make a http request from a C# feature for sharepoint. The request is made inside "ItemAdded" function of a List. The request is made like this: public override void ItemAdded(...
0
votes
2answers
77 views

How to load FeatureDefinitionScope value via csom?

I load features using the code bellow: string siteUrl = "http://MyServer/sites/MySiteCollection"; ClientContext clientContext = new ClientContext(siteUrl); Web site = clientContext.Web; ...
2
votes
1answer
60 views

Difference between Activating Feature in Site Features and Programmatically

I have this strange situation, i have a site definition, that has a feature that after provisioning the site has code that runs, and one of the tasks is to activate the Publishing Feature in the newly ...
0
votes
1answer
145 views

Debug Feature Receiver Webapplication Scope

I'm using SharePoint 2013, VS 2015, I want to Debug my Feature Activated Receiver which is WebApplication Scoped. When I attach w3p or OWSTIMER processes the Feature doesn't show up in Central ...
0
votes
1answer
20 views

How to deploy different files in single feature for mulitple subsites?

I need to deploy different images into picture library for different sub sites in a single feature, I mean I have five images, I need to deploy the first two image in the site collection, third image ...
0
votes
1answer
44 views

How to add new field to existed content type

I need to add new choice field to existed content type. I'd like to do it in feature activate segment. I understand, I need to get content type by ID or name, then create new choice field with my ...
1
vote
0answers
116 views

TopNavigationBar is null when deploying solution through Visual Studio

I am having problems with adding navigation links via a Feature Receiver. Just as a background, I have a feature (FeatConfigureNav) which is activated automatically via a web template. This sis a ...
-1
votes
1answer
359 views

How to change master page in SharePoint 2013

I would like to change master page, how would I do that in SharePoint 2013 Also, I want to do same using programming in a feature receiver.
0
votes
1answer
89 views

Error when Deactivating Farm Feature - Failed to load receiver assembly

I have a farm feature that was updated by PowerShell with the following: Update-SPSolution -Identity FILE.wsp -LiteralPath "PATH\TO\FILE.wsp" –GACDeployment I'm trying to deactivate and then ...
0
votes
1answer
39 views

Where to store web-app wide property with web-scoped feature?

I need to store two URLs in a web-scoped feature. The reason for this is that my solution is deployed unto two different sites and I want to use these properties for storing the urls of these sites so ...
0
votes
1answer
79 views

SharePoint 2010 Error adding a Feature Event Receiver

I want to add a Feature event receiver, that add a webpart to a page, I followed the steps in this link But when I tried to deploy it , I hade the following error : Error occurred in deployment ...
0
votes
1answer
376 views

Error in Feature event receivers : Column does not exist. It may have been deleted by another user

I have created a custom list using custom content type. on feature activation, adding items in the list. but I'm facing error Column 'LeaveStart' does not exist. It may have been deleted by another ...
0
votes
0answers
45 views

Error deploying in production ONLY

I have a SharePoint solution, consisted of 2 features. The first feature is consisted of 5 SharePoint 2010 workflows, and some web pages. The second one is empty and has a feature event receiver that ...
1
vote
0answers
32 views

Sandbox solution getting error on on prem

Sandbox solution gives me error : Unhandled exception was thrown by the sandboxed code wrapper’s Execute method in the partial trust app domain: An unexpected error has occurred from below ...
3
votes
1answer
418 views

Deploy/bind event receivers to lists in single feature

I need to develop and deploy an event receiver (A) to a specific document library <1> and another event receiver (B) to another specific email-enabled document library <2>; both document ...
1
vote
1answer
808 views

Error thrown on Item updating event in SP 2010 “Save Conflict Your changes conflict with those made concurrently by another user”

I have a custom list and I have written an itemUpdating event on it. The event sends an email to some users with updated data. When I click on save, the changes are not saved, though i get the email ...
0
votes
1answer
22 views

Feature activation running slowly on one environment

We have 3 farms, Dev, QA, and Production. Feature activations are running very slowly on the QA environment only. I have a custom feature that deploys files out to the style library and changes the ...
1
vote
0answers
73 views

Feature with an listinstance and eventreceiver to modify version settings, order issue?

I created in vs an listinstance. I add this list instance to a feature. In this feature I created a feature event receiver to modify the version settings. I see now when the feature event receiver is ...
0
votes
1answer
370 views

Cannot deploy solution with feature receiver

I have a weird problem. I have a Sharepoint 2013 solution with two features, one of which has a feature receiver with some code in it. If I deploy this solution either through SPSD or Visual Studio ...
0
votes
1answer
38 views

Collection<> error in feature deactivation

Following code shows the code when the feature gets deactivated: using System; using System.Collections.Generic; using System.Runtime.InteropServices; using Microsoft.SharePoint; using Microsoft....
0
votes
1answer
27 views

Conceptual - How does a custom feature maps to the web application / site?

When we deploy a custom code such as a List Definition with custom forms, we are attaching it into the feature so that upon activation, the list and forms are created. Going behind the scenes, the ...
1
vote
1answer
33 views

Event reciever wont add users to visitors group on teamsite

my code wont add nt authority users to group visitors in min team site why? public override void FeatureActivated(SPFeatureReceiverProperties properties) { string usersAll = "NT ...
2
votes
2answers
608 views

Error occurred in deployment step 'Add Solution': Specified argument was out of the range of valid values

I've been working o a Timerjob project. All of a sudden, when I try to deploy the solution from VS, I got this error: Error 1 Error occurred in deployment step 'Add Solution': Specified ...
1
vote
1answer
55 views

Cannot find right configuration for ReceiverAssembly

I have a custom SPFeatureReceiver, which is supposed to run upon the activation of the feature. The Feature.template.xml has been modified to this: <?xml version="1.0" encoding="utf-8" ?> <...
0
votes
1answer
82 views

Ghost SharePoint solutions must die

We are developing a custom claims provider. In order to aid in debugging I write to a log file. I have little experience with SharePoint but I found and follow several different guides. Essentially,...
4
votes
2answers
4k views

Error occurred in deployment step 'Activate Features':

I am trying to deploy a SharePoint solution on my local machine.But it is giving me the following error: Error occurred in deployment step 'Activate Features': Failed to load receiver assembly "...
0
votes
1answer
33 views

Feature Activation User

Which user context is used in feature activation receiver? Is it current user (when activating from WebUI)? I have to call a service in feature activation receiver and I have to know which user ...
1
vote
1answer
74 views

Programatically identifing feature for activation

I have a requirement where a custom action is only added to the root site of the site collection. So planning to add two features one Site scoped and the other Web scoped. In the event receiver of a ...
1
vote
2answers
412 views

Accessing termstore in Feature Receiver throws UnauthorizedAccessException

Im trying to run the code below but I get a UnauthorizedAccessException at the last line(using SP 2013) TaxonomySession newTaxonomySession = new TaxonomySession(site); var termStore = ...
1
vote
1answer
735 views

Feature Event Receiver not picking up latest code until second activation

I have a Feature with an event receiver (written in c#), which for the sake of brevity creates a list which is a data store for a form on a custom web part. I have ps1 scripts which retract and deploy ...
0
votes
1answer
33 views

When uploaded file from an external program, ItemAdded is not fired

I have an event receiver which works/triggered when I manually add document by click 'Add document', but the same in not working/triggered when an external application is uploading the document. For ...
1
vote
1answer
163 views

is It safe to use feature activated method to create new site column which is used then by content type

We have a content type vs project. The content type is adding a field ref. This field ref is a new site column created using same project but as an empty element. This works. I am wondering whether ...
2
votes
3answers
7k views

Error occurred in deployment step 'Activate Features': Object reference not set to an instance of an object: feature receiver error

I cretaed a Visual web part in SP 2013. It needs a SharePoint list. So wrote below code in web part feature receiver. When I deploy the solution I get error says Error occurred in deployment step '...
0
votes
2answers
930 views

Object reference not set to an instance of an object on feature deployment- Can't deploy even

I am writing code for feature activated code. But when I try to deploy my solution through VS 2010 it says deploy failed Error on feature activation : object reference not set to an instance of an ...
0
votes
2answers
663 views

Feature removal without deactivation

My project had a feature, and on activation of this feature, I was binding an event receiver to a list; on deactivation, the event receiver was removed. It so happened that this feature was activated ...
0
votes
1answer
343 views

Feature activation terminated if code is running too long (SP 2010)

Is it possible that feature activation will fail or will end unexpectedly (without any exceptions in ULS) when it takes too long for code to finish the job? We have a feature which during activation ...
0
votes
1answer
297 views

Unable to see timer job

I have created a custom timer job, which contains a feature. I have successfully activated the feature on my web application, but it does not show up under the job definitions. Feature.xml is as ...
0
votes
1answer
827 views

Activating web feature from event receiver doesn't do anything

I have the following code that should run to automatically disable the Minimal Download Strategy feature when a new site is being provisioned. Unfortunately nothing happens. No errors are captured in ...
2
votes
1answer
400 views

Programmatically setting HtmlDesignAssociated value

I'm deploying a composed look from the server (including the .spcolor, .spfont, master.html and master.preview files), but I cannot get the field Associated File to select. I've tried setting it in ...
1
vote
1answer
533 views

Feature stapling always returns item does not exist: it may have been deleted by another user

I'm attempting to create a feature stapled solution that pushes out custom branding to every new site collection created. The following code is in my event receiver: public override void ...
4
votes
2answers
2k views

Unable to Delete Custom Master Page Programmatically During Feature Deactivation 2013

I currently have a custom master page that is being deployed at the Site scope. Once deployed and the feature is activated it makes the master page available for use. I am able to activate the ...
2
votes
2answers
1k views

Difference between enabling feature from PowerShell and activating it via site collection features page?

I am trying to create a SharePoint list based on a list template via a feature. The code for creating the list is in the FeatureActivated event handler of the feature's EventReceiver.cs file. The list ...
1
vote
2answers
168 views

How to retract unretractable solution

Looks like I made a pretty big mistake when doing some testing with a sample sharepoint project. Ironically, I was trying to spike up a unit testable solution, without writing many of the tests first. ...
2
votes
1answer
846 views

Add Publishing Pages to specfic subsites programmatically in FeatureReceiver

Currently, I have created subsites programmatically in FeatureReceiver method and have a way to create publishing pages, but they are being created on the root site. Is there a way to target a ...
1
vote
0answers
150 views

How to get SPFeatureDefinition for Generic List in sandboxed solution

When creating custom list programatically from schema Add method needs SPFeatureDefinition object of the base list used. SPListCollection.Add method (String, String, String, String, Int32, String,...
0
votes
1answer
36 views

Site provision cycle

I have some site definitions in which I have added multiple lists into the <Lists> tag and then I've added a stapling feature which will trigger a series of web-scoped features when sites are ...
2
votes
1answer
914 views

Deleting lists upon feature deactivation

I have a FeatureReceiver class for a feature that deploy a couple of list instances. In the FeatureDeactivating event I want to remove those instances as well as other artifacts which get deployed ...
3
votes
2answers
1k views

updating CustomMasterUrl of rootweb and subweb

I've created a web template and as part of the provisioning process I set the SPWeb.CustomMasterUrl. I do this in code. When I create a site collection using this template it works fine but if I try ...
1
vote
1answer
180 views

FeatureActivated() not binding two SPEventReceiverDefinitions

I have a feature which I have placed in the onet.xml in to make it active whenever the site collection is created. The feature contains two event receiver definitions for permission groups. One is for ...
2
votes
1answer
505 views

Deployment Issue with Custom FIeld Types

SHORT DESCRIPTION Custom Field Types are not being correctly deployed/activated on all but one Virtual Machine. I have several VMs with identical SharePoint environments. I have a Visual Studio ...