The feature-receiver tag has no wiki summary.
0
votes
2answers
32 views
Failed to load receiver assembly, missing service recycle?
I'm activating a feature using PowerShell and every "once in a while" it fails with the error "Failed to load receiver assembly". It seems to be complaining because some service or application is ...
0
votes
1answer
25 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 ...
0
votes
2answers
50 views
Add web service to sharepoint as feature item
I have a web service and a custom logging service class.
The logging class has a feature that update or remove itself according to the feature events (Activated=SPService.Update, ...
1
vote
1answer
36 views
Add an <assembly> to web.config with SPWebConfigModification
I am trying to add an assembly to configuration/system.web/compilation/assemblies - but with the following code it I get Expression must evaluate to a node-set.
private SPWebConfigModification ...
0
votes
2answers
57 views
How to test if page layout is in use
I have created a module with a few files that I update & delete via spfeature. Thing is if a page layout is in use I cannot delete it and it throws an error, even when inside a try{ }catch{} . How ...
0
votes
2answers
67 views
Changing the SharePoint Home Page doesn't work until I click on site Title
I am installing a sub-site in Sharepoint 2010 using PowerShell. For all the sub-sites, we have configured sharepoint to launch a particular sub-site's default.aspx page as landing page after log-in. ...
0
votes
1answer
39 views
Remove a list from all site collections when a feature is uninstalled
I have a site scoped Feature which specifies a list as such:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
...
2
votes
1answer
109 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, ...
1
vote
1answer
178 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
1answer
45 views
Add custom code for solution upgrade
I have a solution for SP2010. Let's call it s.wsp. I had version 1 of s.wsp and now I have version 2 of s.wsp. Versions 1 and 2 share three common features: A, B and C. Version 2 adds a new feature D.
...
2
votes
1answer
420 views
Event Receivers not added when installing wsp
I have a set of event receivers for a SharePoint 2010 content type and Library. Previously, these would install and automatically be activated when I ran a script to install the wsp solution. I dug ...
0
votes
3answers
642 views
Get deployed .aspx page in feature receiver to add WebPart
I have a SharePoint solution which deploys an aspx page in a custom folder in the Layouts folder. I need to get this page in the Feature Event Receiver so I can add to it a WebPart.
In the ...
0
votes
1answer
307 views
Problem with save conflict when adding content type to list
I have a feature receiver with the following code:
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPSite site = (SPSite)properties.Feature.Parent;
...
1
vote
2answers
69 views
SPWebConfigModification class not found?
Using Sharepoint 2010, I am trying to use the SPWebConfigModification class to add connection strings the the sharepoint's web.config.
My problem is that the class SPWebConfigModification is not ...
1
vote
1answer
107 views
Perform a blob cache flush in a feature event receiver
I have a site collection scoped feature that should provision a css file to the "Style Library" of a site collection. The feature also performs cleanup of the file in the deactivation receiver.
I ...
0
votes
1answer
151 views
Unable to create Sub web Programmatically in Feature Receiver
I have write code in Feature Receiver to Create SubSite but while Feature is activating it returns the error
http://pc31:2000 contains illegal character ':'.
This is My Code where I got Error. ...
0
votes
1answer
108 views
Error adding feature receiver
I have added a feature receiver code file to a web template in visual studio. When i deploy it i get the following error. If i delete the feature receiver it works fine.
I have tried cleaning the ...
0
votes
2answers
63 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 ...
0
votes
1answer
41 views
Sharepoint Feature Creation Approach
I want to create a feature, once the feature is activated by the administrator a number of lists, items and workflows will be created.
What would be the best approach to implementing this?
The ...
1
vote
1answer
198 views
Get current user in SPFeatureReceiver?
I am working on a web application-scoped feature which creates a site collection. I would like to set the person who activated the feature as site collection owner. To do that, I would have to either:
...
0
votes
1answer
244 views
Error while creating Event Receiver
This is Sample of my Code
SPList list = new SPSite(siteURL).OpenWeb().Lists[listName];
SPEventReceiverDefinitionCollection eventReceivers = list.EventReceivers;
SPEventReceiverDefinition ...
1
vote
1answer
566 views
Programmatically set homepage in Sharepoint Foundation
I need to set the homepage to default.aspx in my FeatureActivated event receiver. I tried
rootWeb.RootFolder.WelcomePage = "default.aspx";
rootWeb.RootFolder.Update();
but that doesn't seem to be ...
1
vote
2answers
691 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
0answers
56 views
Problem to disable a feature in SharePoint 2007
I am working on Sharepoint 2007 and Visual Studio 2008 and I have a problem with SPFeatureReceiver.FeatureDeactivating.
The project is to create a feature to create a PictureLibrary.
I create a ...
2
votes
1answer
640 views
failed to create receiver object from assembly sharepoint 2010
I have created two features and I want both use same receever class so I created a class MyFeatureReceiver (some where in project SP/MyRecievers/) which implements SPFeatureReceiver and has a ...
0
votes
0answers
119 views
FeatureActivated is not firing after activating feature in code-behind
I've a strange problem with activating a feature from C#: I have a list with a event receiver attached, which creates a new sub-site every time a new listitem has been added:
var newWeb = ...
0
votes
1answer
79 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 ...
1
vote
2answers
95 views
SPDispose check gives error
SPDispose gives error Disposable type not disposed Microsoft.SharePoint.SPSite ***This may be a false positive depending on how the type was created or if it is disposed outside the current scope ...
2
votes
1answer
175 views
Will feature receiver get activate if user has no permissions to a site?
Here's what I need...User does not have access to a site (http://myserver/sites/MySite). When user tries to access they are redirected to ugly AccessDenied.aspx.
I was researching and found that ...
2
votes
2answers
100 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 ...
0
votes
1answer
400 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 ...
0
votes
0answers
113 views
“Fixing” the DataSource Guid for in a DataView Webpart
I am creating a Sandbox solution that deploys three External Lists. (Their datasource has already been configured within the Farm.) Along with the list instances, I am deploying to the 'Site Pages' ...
0
votes
2answers
376 views
SharePoint service account can't access its own temp directory
I have a feature with a an event receiver that have to uncompress an archive (actually an Infopath Form), patch some data and recompress the archive (using Cab compression).
In order to "properly" ...
1
vote
1answer
381 views
ContenTypes on List Definition not added
I've an ListDefinition with some references to existing Content Types (provided by CTH) but when the list is created the content types are not added.
elements.xml
<Elements ...
3
votes
4answers
7k views
Error occurred in deployment step 'Activate Features': <nativehr>0x80070002</nativehr><nativestack></nativestack>
I have a feature. On the FeatureActivated event I am creating a list if it is not there. I also have an EventReceiver that in the elements.xml on the Receivers node has the attribute ListUrl. This is ...
3
votes
1answer
283 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
1answer
177 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
1answer
385 views
SPWebApplication is null in Feature Reciever
in this code variable _service is null. Any idea what's wrong? It was working before without any problems...
private SPWebApplication _service;
...
_service = properties.Feature.Parent as ...
0
votes
1answer
91 views
Hooking feature reciever issue
I have invalidly hooked feature reciever. Feature has two configuration files The first, SharePoint looks like this:
< feature ...
1
vote
2answers
3k views
Failed to load reciever assembly
me again =) ... I have issue during deployment. It throws: Failed to load reciever assembly ... I tried to GAC that assembly, also microsoft.office.sharepoint.clientextensions.dll and ...
0
votes
1answer
126 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.
4
votes
3answers
4k views
Best method to create custom NewForm / EditForm
I am new to sharepoint development and need to create some custom NewForm/EditForms for a new custom list I am creating. It seems like I have two choices:
...
1
vote
1answer
278 views
How Do I Rename a List Instance's Field's StaticName in FeatureUpdating?
I am creating a custom WSP in Visual Studio. This solution has several custom content types with custom fields as well as a list instance with content types enabled. Unfortunately, i need to change ...
0
votes
1answer
313 views
SharePoint 2010: Register InfoPath forms and use custom feature reciver jointly
I am new to SharePoint, sorry if answer to my question is obvious.
I am using Custom InfoPath Task Forms in my project. For form registering, I am using next code in Feature.Template.xml:
<?xml ...
0
votes
2answers
127 views
How can I pass an argument to a FeatureReceiver during solution setup?
I have this Sharepoint 2010 solution containing 3 projects:
Class Library with Model classes
Class Library with LINQ to SQL data context
Sharepoint 2010 project
WCF REST service
3 Visual web parts
...
1
vote
1answer
468 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 ...
3
votes
3answers
3k views
FeatureActivated event receiver giving access denied when trying so set WebApplication property
When a Site event feature is activated I am trying to set some properties on the web application. My feature uses this value.
public override void FeatureActivated(SPFeatureReceiverProperties ...
0
votes
1answer
161 views
Object reference not set on Feature Receiver in a Stapled feature
SharePoint 2010 question.
My 1st goal is to add some custom themes to site collections when they're created.
I have this working with a simple 2 feature stapling solution (Themes.Feature, ...
3
votes
2answers
240 views
Error on feature activated property creation
Im trying to create custom properties on feature activated event, but it doenst work, does anyone has any suggestion, what the problem could be?
When i do a console application and try there my code ...
2
votes
2answers
604 views
Preventing alerts from being sent when programmatically updating list item
I have a feature receiver which batch updates a particular field / column in my list. Code is provided below.
NB: This is very simple list item batch processing code which I got from ...


