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

learn more… | top users | synonyms

1
vote
2answers
122 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
198 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
142 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
1answer
1k 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 ...
1
vote
2answers
676 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
505 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 ...
6
votes
4answers
18k 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
545 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
229 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
751 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
132 views

Hooking feature reciever issue

I have invalidly hooked feature reciever. Feature has two configuration files The first, SharePoint looks like this: < feature ...
3
votes
2answers
6k views

Failed to load reciever assembly

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 Microsoft.Office.Server.dll ...
0
votes
1answer
150 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.
6
votes
3answers
8k 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
383 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
373 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
260 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
716 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 ...
5
votes
3answers
6k 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
182 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
327 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
814 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 ...
1
vote
1answer
156 views

How to rename a file in the 14 hive - edited-

I need to rename the user.aspx file in the 14 hive layouts directory in a feature event receiver. Is this possible ...if so...how? OK - Bad idea....This is what i want to do: I have a custom ...
1
vote
2answers
330 views

Visual Studio 2010 Workflows not associating with list

Probably a silly question: I have a vs2010 project with workflows in a site scoped feature. When i deploy through visual studio the workflows are associated with lists. However when i deploy ...
4
votes
4answers
1k views

Web Template - Receivers Not Firing

I have a custom web template used to provision site collections that activates features with onet.xml and is deployed as a farm solution. I've tried both feature receivers and event receivers (on ...
5
votes
1answer
137 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 ...
1
vote
1answer
2k views

Delete page from the Site Pages library

Wondering if someone has the code to delete a page from the Site Pages library in a Feature Event Receiver on de-activation TIA
0
votes
1answer
182 views

Versioning and upgrading features with SharePoint 2010 [closed]

I've been experimenting with feature version-ing and upgrading in Sharepoint 2010 and found a bunch of blogs, documentations etc. but it is still not very clear to me. How does Sharepoint store the ...
1
vote
2answers
3k 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 ...
1
vote
3answers
2k views

Powershell Deployment - Enable-SPFeature Error

I get the following problem activating a feature in powershell: Enable-SPFeature : The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: ...
4
votes
2answers
275 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; ...
2
votes
2answers
652 views

Why do I get a security validation invalid error updating a field from a feature receiver?

Trying to change the title field of a document library to be required..doesn't want to work. SPList docLib = web.Lists["Process Aids"]; SPField field = docLib.Fields["Title"]; field.Title = "Display ...
1
vote
1answer
106 views

Disable Web-scoped features on Web deletion

I have a SPWeb ( http://example.com/site ), created used a custom web template, with several features activated on its scope. When I delete the SPWeb it would be desirable that all the features ...
1
vote
2answers
128 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 ...
0
votes
1answer
736 views

Cannot set the associated group from a feature receiver

In a feature receiver, I want to create group and set the associated owner group of the Web. This feature is activated automatically from a custom site template (I think this the root of the problem). ...
7
votes
3answers
3k 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 ...
1
vote
1answer
2k views

Deleting Site Columns and Content Types Programmatically

I have a feature that adds two site columns to a content type on activation. On deactivation it's supposed to delete them, but I'm getting the following error: "Site columns which are included in ...
5
votes
2answers
965 views

Can't deploy Admin Approved Form Template using XSNFeatureReceiver in SharePoint 2010

I am trying to deploy an Administrator Approved InfoPath form template to SharePoint 2010 as a feature. I've done this lots of times in 2007 and never had an issue - but this will not play ball. I ...
2
votes
4answers
4k views

SP2010 Reset all subsites to inherit masterpage using c#

I'm creating a site feature reciever which sets a custom master page on the root web. I would also like the master page set on the root to be inherit to all the subsites. What is the most elegant way ...
2
votes
3answers
1k views

SPWebConfigModification class will not update Central Admin application's web.config file

Using SharePoint 2010 I am trying to use the SPWebConfigModification class to make some basic changes to web.config files on applications in the farm, including the Central Administration web.config ...
2
votes
1answer
396 views

Deploying webparts to default.aspx with a SiteDefinition feature dependency

I tried deploying a Site Definition with a custom default.aspx page. Within the <WebFeatures> node of the Site Definition's Onet.xml I tried to reference a Feature which would get a web part ...