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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Getting error while deactivating feature

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :SharePoint
 

I am getting below error when I try to deactivate a feature. Upon debugging it is failing when trying to delete the job (that is job.delete in the code snippet below).

I have observed that both feature activation/deactivation from 'site collection feature' link fails.

I am guessing it is a permission issue even though my account is included in site collection admin as well as farm admin. Please suggest if any other accounts (app-pool, system etc) needs any other permissions etc.

 

Below is the code snippet

 

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties)

        {

            SPSite site = properties.Feature.Parent as SPSite;

 

            // delete the job

            foreach (SPJobDefinition job in site.WebApplication.JobDefinitions)

            {

                if (job.Name == TASK_LOGGER_JOB_NAME)

                    job.Delete();

            }

       &nbs


View Complete Post


More Related Resource Links

Feature not installed error.

  

HI, i got following error when trying to open the custom toolpane that have option to load the sharepoint document library in the page. When i open the open toolpane following error shows:

 

 

Feature '1511a6c7-4e7f-449a-949d-2e3099560c97' for list template '101' is not installed in this farm.  The operation could not be completed.

 

                            Any help will be highly appriciated..

                                               


Error when activating Infopath form deployed as a feature

  
I've packaged a form as a feature and created the appropriate WSP file for it.  i then deployed this feature to a target system using the following commands: @SET STSADM="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM" @ECHO OFF ECHO Retract Solution %STSADM% -o retractsolution -n "Crown.SharePoint.CAPEXForm.wsp" -immediate ECHO ====== %STSADM% -o execadmsvcjobs ECHO Remove Solution %STSADM% -o deletesolution -n "Crown.SharePoint.CAPEXForm.wsp" -override ECHO ====== %STSADM% -o execadmsvcjobs ECHO Adding Solution %STSADM% -o addsolution -f "Crown.SharePoint.CAPEXForm.wsp" ECHO ====== %STSADM% -o execadmsvcjobs ECHO Deploying Solution %STSADM% -o deploysolution -n "Crown.SharePoint.CAPEXForm.wsp" -immediate -allowgacdeployment -force ECHO ====== %STSADM% -o execadmsvcjobs The deployment process completes without errors, and when I check under Central Admin > Solution Mgmt, my feature is there and shows as "Deployed/Globally Deployed".  So all looks good at this time. However, when I go to the Site Collection and try to activate the feature I get this error -- any ideas what may be going on here or what I'm missing? Feature '25f5615f-b338-48ff-8eb7-2ba05dd9972c' could not be installed because the loading of event receiver assembly "Microsoft.Office.InfoPath.Server

Deactivating web part feature in sharepoint

  
Hey guys. I've developed a web part using the wspbuilder tool (Web part with feature). When deployed (to a site collection), you have to activate the feature in order to use this web part - so far so good. However, when deactivating the feature, the web part remains on any site where it's been added, and furthermore, it's still available in the web part gallery? Is this expected behaviour? Is there no way of removing the web part from all subsites in the site collection, and also remove it from the web part gallery? Thanks ;)

Error : Please enter a different user name. How can I set this feature off?

  
I have made a page where people can register themselfs with a CreateUserwizard.But when I have a user test and the next user wants to register hisself with the username testlocal then I get the message :Please enter a different user name.I think I get this message because the check of the user length is to short. So where can I set this length? And how can I set this check off?Thnx.

Error on activation of feature

  
hello everybody i am creating list templates using features . i have created 3 files :- feature.xml , timesheet.xml,schema.xml . the feature is installed succesfully through stsadm but on activating feature error comes in stsadm as "Cannot complete this action.Please try again." I then tried to do it through GUI ->Sitefeatures->activate but error comes . then i tried to use force coomand as following :- stsadm -o activatefeature -name LitwareTimesheets -url "http://a-uhc:100/sites/projectmanagement" -force command prompt shows that operation completed successfully but nothing happens as i can't see feature in site features or list created in my main site . i havepasted files below:- feature.xml <?   xml version="1.0" encoding="utf-8" ?> <   Feature Id="85B2D079-AC3E-4260-9124-DBCAC2ABEAB0"     Title="Litware Timesheets"     Description="This feature provides support for Litware Timesheets"     Version="1.0.0.0"     Hidden="FALSE"     Scope="Site"     DefaultResourceFile="core"     xmlns="http://schemas.microsoft.com/sharepoint/"> <   ElementManifests> <   ElementManifest Location="Timesheets.xml"

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"
 xmlns="http://schemas.microsoft.com/sharepoint/" 
 ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" 
 ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver" >
 <Properties>
 <Property Key="GloballyAvailable" Value="true" />
 <Property Key="RegisterForms" Value="*.xsn"/>
 </Properties>
 <!--<ElementManifests> 
 <ElementFile Location="ApprovalFormWComments.xsn" /> 
 </ElementManifests>-->
</Feature>

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

"This feature installing a form template does not match the expected format" error

  

I'm trying to create a new SP Feature that consists of the following components -- an InfoPath form, a document library (list) where these forms will be used, and a custom Task list (that will be used in a workflow that is triggered when the form is submitted).  Each of these components was created in a DEV env and is working.  I then created my feature in Visual Studio 2008 and successfully created the WSP file.  I then (successfully) installed the WSP (I got no errors on install and all seemed well -- the "solution" shows up under Central Admin and shows as being deployed. 

When I go to site settings, the feature shows up, but deactivated.  WHen I attempt to activate it, however, I get this error in the SP Logs:

09/24/2010 09:38:19.12  OWSTIMER.EXE (0x07C4)                    0x07F0 Forms Server                   Forms Services Deployment      

82mz Exception FeatureInstalled failed with unhandled exception Microsoft.Office.InfoPath.Server.Util.InfoPathLocalizedException: This feature installing a form template does not match the expected format: CAPital EXpenditure Request. Refer to the

Error while installing a feature on sharepoint site

  

Hi everyone,

  I am trying to install a feature that creates an custom menu item.

  When I run the stsadm command the following error comes :

Required tag 'http://schemas.microsoft.com/sharepoint/:Feature' is missing from XML file ...\12\Templates\Features\GoogleMenuItem\feature.xml'. found 'Feature' instead.

Kindly help me resolve this error...

 

Thank you


SQL Server 2008 Upgrade Error - SQL Server 2008 Feature Upgrade

  

I get the following rule check error when attempting to run the SQL Server Upgrade process on my Vista Ultimate machine:

 

Code Snippet

---------------------------
Rule Check Result
---------------------------
Rule "SQL Server 2008 Feature Upgrade" failed.

The specified edition upgrade is not supported. For information about supported upgrade paths, see the SQL Server 2008 version and edition upgrade matrix in Books Online.
---------------------------
OK  
---------------------------

 

However, the version that I'm attempting to upgrade from is -  Standard Edition - Version 9.00.1399.06

 

And according to the Version and Editions Upgrades matrix, this should be possible?


Error after installing Feature

  
hi,
I have installed a feature with scope of web.
The feature is for event handler.
After installation, I got the message as "operation completed successfully" on command prompt.
But, when I moved to site settings->site features I got the error as
Exception from HRESULT: 0x8107025D
After uninstalling the feature, I was able to view the page as it was.

I tried installing the same feature on another server and it worked fine there.
Can anybody help me?
Why I am getting this error?

Thanks !!

404 Not found error when redeployed a feature with different name.

  

Hi All,

I have deployed a feature globally with name say Feature_1. This feature contains 3 .aspx pages (page1.aspx, page2.aspx and page3.aspx). After deployment the feature was working fine.

Now I want to change the feature name and also want to add one new aspx page, lets say page4.aspx. So i modified my feature by changing the name form Feature_1 to Feature_2. And also added the new aspx page. After then I retracted and removed the Feature_1 solution through SharePoint Central Admin. And deployed the new solution i.e. Feature_2.

But now when I am browing the aspx pages I am getting "404 Not Found" error for page1.aspx, page2.aspx and page3.aspx. Whereas page4.aspx page get displayed properly.

Can anyone explain me why i am not getting the old aspx pages after changing the feature name.
Thanks in advance.

Best Regards,


-Kaustubh

TimerJob feature activation error: access denied

  

Hi,

I created a timer job in VS 2010 using a Class Library Project Template and performed the rest of the required steps to deploy it. It is visible in my Site Collection Features but the problem is that when I try to activate it, an error is thrown. The error in log file says

The SPPersistedObject, MyTimerJob Name=Test Timer Job, could not be updated because the current user is not a Farm Administrator.	47f5015b-f5ba-43c6-8bc6-5a8208dbe403
Feature receiver assembly 'MyTimerJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc9139360518fedf', class 'MyTimerJob.TaskJobInstaller', method 'FeatureActivated' for feature '6805d4ac-8158-4555-8659-4a8815d0e0e1' threw an exception: System.Security.SecurityException: Access denied.   at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate()   at Microsoft.SharePoint.Administration.SPJobDefinition.Update()   at MyTimerJob.TaskJobInstaller.FeatureActivated(SPFeatureReceiverProperties properties)   at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) The Zone of the assembly that failed was: MyComputer	47f5015b-f5ba-43c6-8bc6-5a8208dbe403
Feature Activation: Threw an exception, attempting to roll back. Feature 'MyTimerJob' (ID: '6805d4ac-8158-4555-8659-4a8815d0e0e1'). Exception: System.Security.SecurityException: Access denied.   at Microsoft.SharePoint.Admi

Upgrade error on feature when installing cummulative update august 2010 for Sharepoint 2010

  

We are not able to complete the installation of the cummulative upgrade for august 2010 becase of this error msg:

Feature Infrastructure - 9fnu - High - Feature Upgrade: Exception thrown updating content database with new version number for Feature 'MyFeature' (Id: '1860bfc8-f21b-48f0-bd0d-e7061d36921f') in Site 'http://www.site.com': Object reference not set to an instance of an object. 44432789-ef04-4587-9cb9-f97a5d7e0258

This is a custom feature that our company has developed. It is very simple, contains two content types (view xml below):

<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="MyCTFeature" Description="My feature description" Id="1860bfc8-f21b-48f0-bd0d-e7061d36921f" Scope="Site" Version="1.0.0.0">
  <ActivationDependencies>
    <ActivationDependency FeatureDescription="Custom fields" FeatureId="24b9624b-0e56-44ad-9757-d06a5e1225af" FeatureTitle="MyFieldsFeature" />
  </ActivationDependencies>
  <ElementManifests>
    <ElementManifest Location="Kjerneside\Elements.xml" />
    <ElementManifest Location="Informasjonsside\Eleme

TimerJob feature activation error: access denied

  

Hi,

I created a timer job in VS 2010 using a Class Library Project Template and performed the rest of the required steps to deploy it. It is visible in my Site Collection Features but the problem is that when I try to activate it, an error is thrown. The error in log file says

The SPPersistedObject, MyTimerJob Name=Test Timer Job, could not be updated because the current user is not a Farm Administrator.	47f5015b-f5ba-43c6-8bc6-5a8208dbe403
Feature receiver assembly 'MyTimerJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc9139360518fedf', class 'MyTimerJob.TaskJobInstaller', method 'FeatureActivated' for feature '6805d4ac-8158-4555-8659-4a8815d0e0e1' threw an exception: System.Security.SecurityException: Access denied.   at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate()   at Microsoft.SharePoint.Administration.SPJobDefinition.Update()   at MyTimerJob.TaskJobInstaller.FeatureActivated(SPFeatureReceiverProperties properties)   at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) The Zone of the assembly that failed was: MyComputer	47f5015b-f5ba-43c6-8bc6-5a8208dbe403
Feature Activation: Threw an exception, attempting to roll back. Feature 'MyTimerJob' (ID: '6805d4ac-8158-4555-8659-4a8815d0e0e1'). Exception: System.Security.SecurityException: Access denied.   at Microsoft.SharePoint.Admi

SiteUrl feature property error when using BCS/BDC Model in VS 2010 Beta 2

  
Hi
I'm having this problem, and im not sure if this is a bug or im supposed to do something.

When creating a BDC (BCS) model in VS2010 Beta 2, VS adds a property called "SiteUrl" to the BDC feature properties (You can find that in the properties panel when you select the BDC model item in solution explorer).
This property is causing a problem when i try to deploy the package to another server; obviously because it is storing my development machine site Url and when it gets activated on the other server (test server) it will throw an error saying that the site does not exist.
The workaround that i do is to remove that property and create the package, which works fine, but then if i close VS and reopen the solution again, the SiteUrl property comes back again.

I can also see that this will cause a problem if other developers are working on the same code. They will basically get that SiteUrl on their machine which might point to another developer's machine. 

Any comments on this?

Error while installing claims provider feature

  

Hi all,

I am getting an error while installing my own claims provider from power shell. I am continuously getting the below error.

PS C:\Users\Administrator> Install-SPFeature TestClaimsProvider
Install-SPFeature : The type specified does not contain a constructor with a si
ngle string input.
At line:1 char:18
+ Install-SPFeature <<<<  TestClaimsProvider
  + CategoryInfo     : InvalidData: (Microsoft.Share...tInstallFeature:
  SPCmdletInstallFeature) [Install-SPFeature], MissingMethodException
  + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletInstallF
  eature

Can someone suggest me what could be wrong? And my featurexml is below.

<Feature  Id="B5D38E9F-F02A-486C-98AE-33BE1947EBC5<

Custom Workflow deployed:Feature activation error:The file or folder name contains characters that a

  

Hi,

I am migrating custom workflow which was running in moss 2007 to SharePoint 2010.The approach was i created a new Sequential workflow project in VS 2010 under sharepoint . then i copied my Workflow files.Removed old refernces to 12 hive and updated to 14 root.

I could successfully buid this project.Then i have added Module project item called 'Forms' where i placed my Intiation form which is a infopath published form to nework location.

I could package and deploy the solution.But facing an error while Activating the feature.the error is The file or folder name contains characters that are not permitted.  Please use a different name.

 

Any help will be highly appritiated

 

Regards

Ram kiran

 


Categories: 
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