All Questions
Tagged with feature-activation feature-receiver
37 questions
0
votes
0
answers
25
views
Getting a WebPartPageUserException trying to activate a feature (via Powershell) that installs a CEWP on a Wiki page
SP 2016. I have a web-scoped feature that
deploys an HTML page to the Site Assets library via a module
has feature activation code that:
creates a new Wiki page in the Site Pages library
inserts a ...
2
votes
1
answer
116
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
1
answer
22
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
1
answer
136
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
1
answer
123
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
0
answers
58
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
0
answers
36
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 ...
0
votes
1
answer
26
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 ...
2
votes
2
answers
682
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
...
0
votes
1
answer
38
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
1
answer
81
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
1
answer
831
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 ...
1
vote
1
answer
425
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
1
answer
377
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
1
answer
875
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
2
answers
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 ...
2
votes
1
answer
951
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 ...
1
vote
1
answer
210
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
1
answer
529
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 ...
0
votes
1
answer
251
views
Execute SPFeatureReceiver only on site creation
We have recently upgraded from SharePoint 2007 to 2010 and we aren't yet ready to train users on the new interface, so I've created a SPFeatureReceiver that will set the site template back to the 2007 ...
2
votes
1
answer
886
views
SPListCollection.EnsureSitePagesLibrary() throwing SPException (specified title already exists in this Web site)
I am attempting to call SPListCollection.EnsureSitePagesLibrary() upon FeatureActivated. The method is throwing the following exception:
Microsoft.SharePoint.SPException: A list, survey, discussion ...
2
votes
1
answer
1k
views
Feature Activated Event not triggered when creating a new sub site with web template
When I create a new site I have a Web Scoped FeatureActivated event that I would like to run. The feature does get Activated but the FeatureActivated event is not triggered.
The site is created with ...
0
votes
2
answers
209
views
How do i create a feature in web template?
I have created a web template in visual studio, it includes the standard element file and onet file, it also has a feature which is scoped to site level.
All this works fine, i can deploy it and can ...
1
vote
4
answers
5k
views
Error while activating custom feature
I have a wsp package installed as farm solution. package has event reciever on activating feature. When I go to Site Collection Features and activate this feature i get an error
Error
File ...
0
votes
1
answer
123
views
Problem activating feature on child webs
I have a feature that is manually activated. In a feature receiver I also activate the feature on any child SPWebs in existence. I would like some code to run only on the SPWeb where the feature is ...
2
votes
2
answers
202
views
How to catch the feature activate time
I am trying to write one program such that, when ever a feature is activated then it should display the activated time in the sharepoint list. for that i written following code.
public class ...
1
vote
2
answers
3k
views
how to remove a published content type from subscribed site collections
I have a small Visual Studio 2010 project with one farm level feature that I deploy to a site collection which is configured as my content type hub. The FeatureActivated event adds a site column and ...
3
votes
1
answer
949
views
Is SPFeatureCollection.Add method asynchronous?
I have a quite complex application that is split into several features.
In order to hide this complexity, I set the IsHidden property of the feature to true, then have created a "master" feature. ...
0
votes
1
answer
283
views
Custom Site Content type is not getting mapped for the required taxonomy field
I have a custom project site template which is coded in c#.net VS 2010, I have deployed the projects related to the project site template into central admin through VS
After deploying the solution I ...
0
votes
1
answer
164
views
Hooking feature reciever issue
I have invalidly hooked feature reciever. Feature has two configuration files The first, SharePoint looks like this:
< feature xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/...
0
votes
1
answer
193
views
Using a feature receiver to add a directory to the web applications folder
Wondering if someone knows how to add a directory/folder to the web applications folder within IIS using a feature event receiver (FeatureActivated).
Any help appreciated.
1
vote
1
answer
1k
views
removing a sharepoint solution duplicates entry in web.config?
My intentions is to be able to add and remove web.config changes when a solution is installed or uninstalled.
The code below and the powershell below works ALMOST as expected.
When I add sp solution,...
5
votes
1
answer
154
views
How to handle web references becoming stale in a web feature activation
We have a number of web-scoped features all stapled to a site definition, so they are all activated in turn when a web is created from the definition.
It seems the feature receivers all share the ...
4
votes
3
answers
7k
views
The breakpoint will not currently be hit - debuging feature receiver
I need to debug my feature receiver, so I set up few breakpoints, but when I hit F5 in VS2010, they are all missed, and it says that "The breakpoint will not currently be hit. No symbols have been ...
4
votes
2
answers
380
views
Feature Activation Logic (Prevent Activation)
I have three site collection features used to set branding throughout the site collection. I want to prevent the accidental activation of one of the features if one of the three is already activated; ...
1
vote
2
answers
154
views
Backup a file while custom feature activated?
We have a custom application page "custom.aspx" on the Layout folder, would like to rename the original file "custom.aspx" to "custom_bak.aspx" before the updated/modified custom application page "...
9
votes
3
answers
6k
views
How do you "stop" activating a feature within the feature receiver?
I have a feature receiver with some long running code, hence I use SPLongOperation and delegate for better visual appearance. Basically my feature receiver looks like so:
public override void ...