Web Provisioned feature in SharePoint not deactivating web feature

I am trying to remove certain feature from a web when it is created. But it is not working at all. when i debug i see this feature definitions are null.
am i doing something wrong in the code
public override void WebProvisioned(SPWebEventProperties properties)
SPWeb web = properties.Web;
SPFeatureDefinition featureDefinitionreport = SPFarm.Local.FeatureDefinitions["7ED6CD55-B479-4EB7-A529-E99A24C10BD3"];
// this featuredefinitionreport is null when debugged
SPFeatureDefinition feauturedefinitionrollup = SPFarm.Local.FeatureDefinitions["DFFAAE84-60EE-413A-9600-1CF431CF0560"];
// this featuredefinitionreport is null when debugged
if (web.FeatureDefinitions["7ED6CD55-B479-4EB7-A529-E99A24C10BD3"] != null)
web.Features.Remove(featureDefinitionreport.Id, true);
if (web.FeatureDefinitions["DFFAAE84-60EE-413A-9600-1CF431CF0560"] != null)
web.Features.Remove(feauturedefinitionrollup.Id, true);
web.Update();
kukdai

I am trying to remove certain feature from a web when it is created. But it is not working at all. when i debug i see this feature definitions are null.
am i doing something wrong in the code
public override void WebProvisioned(SPWebEventProperties properties)
SPWeb web = properties.Web;
SPFeatureDefinition featureDefinitionreport = SPFarm.Local.FeatureDefinitions["7ED6CD55-B479-4EB7-A529-E99A24C10BD3"];
// this featuredefinitionreport is null when debugged
SPFeatureDefinition feauturedefinitionrollup = SPFarm.Local.FeatureDefinitions["DFFAAE84-60EE-413A-9600-1CF431CF0560"];
//this featuredefinitionreport is null when debugged
if (web.FeatureDefinitions["7ED6CD55-B479-4EB7-A529-E99A24C10BD3"] != null)
web.Features.Remove(featureDefinitionreport.Id, true);
if (web.FeatureDefinitions["DFFAAE84-60EE-413A-9600-1CF431CF0560"] != null)
web.Features.Remove(feauturedefinitionrollup.Id, true);
web.Update();
kukdai

Similar Messages

  • Provision Search in SharePoint Foundation 2013 without Domain Controller / Active Directory - Domain accounts

    Hi,
    I have successfully setup SharePoint Foundation 2013 as single server farm with SQL Server Standard database in a DMZ environment using local accounts since DMZ doesn't have an Active Directory and hence Domain accounts using powershell as described
    in https://theblobfarm.wordpress.com/2012/12/03/installing-sharepoint-2013-without-a-domain-controller 
    When I run Farm configuration wizard to provision search service application, I get an error:
    ERROR: "The service application(s) for the service "Search Service Application" could not be provisioned because of the following error: I/O error occurred."
    The log file logged the details of this error as:
    ERROR: "Failed to create file share Analytics_e441aa1c-1a8d-4f0a-a079-58b499eb4c50 at D:\SharePoint Search\Office Server\Analytics_e441aa1c-1a8d-4f0a-a079-58b499eb4c50 (System.ArgumentException: The SDDL string contains an invalid sid or a sid
    that cannot be translated."
    After investigation, I found that potentially the error could be because the timer service is trying to setup a network share for analytics component (as part of provisioning search). It is trying to setup that share with a domain account that happens to
    be a local user instead in this case and fails with error “System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated”.
    I got some pointer from the below thread
    https://social.technet.microsoft.com/Forums/en-US/c8e93984-f4e5-46da-8e8a-c5c79ea1ff62/error-creating-search-service-application-on-sharepoint-foundation-with-local-account?forum=sharepointadmin
    However, the above thread doesn't state that the solution worked.
    I have tried creating share manually for Analytics_<Guid> folder but it doesn't work since every time farm configuration wizards is run it creates a new Analytics_<Guid> folder.
    Since, I have setup SharePoint Foundation 2013 on a production environment I cannot test and trial various solutions.
    Can some please guide me on how to successfully provision search for SharePoint Foundation 2013 setup as a single server farm with SQL Server Standard database in a DMZ environment using local accounts (without Active Directory - domain accounts).
    Thanks in advance.
    Himanshu

    Microsoft documentation doesn't always specifically call out all products (Project Server isn't there, either). But it does apply. You'll need to stand up at least one Domain Controller, or allow port access back to a DC.
    Preferably, set up SharePoint on the internal network and use a reverse proxy (which will terminate client connections at the reverse proxy) present in the DMZ.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • What is the provisioning feature in the settings under, general profile? It says something about "provisioning". What does that mean and what does it do?? (It's on my 5th generation iPod touch, black, iOS 6.1.3

    What is the provisioning feature in the settings under, general>profile? It says something about "provisioning". What does that mean and what does it do?? (It's on my 5th generation iPod touch, black, iOS 6.1.3

    A profile is used on iOS device to add specific settings and similar things to an iOS device.  Tryically, they are added when the iOS devices is controlled by a company or school.
    However, some apps install a profile. If your iPod is not controlled by a company or school then it seems an app added the profile. You can good the title if the profile and see if that gives any info.

  • Provision that MRP is not be considered for specific line item of Sales Ord

    Is their any provision that MRP is not be considered for specific line item of Sales Order in MRP run? (Ex: Planned order is also generated for free/ADC sample quantity entered in Sales order)

    Dear
    Go to Sales and distribution--> Sales --> Sales Documents -->Schedule Lines --> Assign schedule line categories.
    Choose the item category (eg. TAN)  which is coming in the sales order and enter CN - No. Mat. Planning in the the manual schedule line category (MSL Ca) for MRP type PD.
    This will enable you to choose while creating sales order in the Tab procurement column SL Ca.
    Choose CN - No mat.planning for the schedule items which you don;t want MRP.
    Regards
    Soundar

  • My old computer crashed and I am trying to download Adobe X Pro on my computer. I have tried to download and the only download I can find is the Adobe XI Pro. Any help would be appreciated. I have the product key but it's not deactivated on my old compute

    My old computer crashed and I am trying to download Adobe X Pro on my computer. I have tried to download and the only download I can find is the Adobe XI Pro. Any help would be appreciated. I have the product key but it's not deactivated on my old computer.

    if you need to deactivate, contact adobe support
    https://helpx.adobe.com/contact.html
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.
    window using the Lightroom 3 link to see those 'Important Instructions'.

  • SharePoint not working on safari 8.0.3

    SharePoint not working on safari 8.0.3. get an error to say server request timed out. this works on chrome

    Hi,
    Any one that was having this issue will be happy to know that what you read on google is incorrect apple didnt block java at all they blocked the older versions to make people continue using the new versions
    please install java 7 update 17 then go to the below link
    http://java.com/en/download/testjava.jsp
    it will say " inactive plugin" to begin with but if you click the text it will then work close safari and test the link again
    it should then come up and say "your java is working and up to date"

  • I would like to buy Adobe Acrobat pro 9 from ebay. The product was not deactivated, since the pc and the company no longer exists. Can I buy and activate the product ?

    I would like to buy Adobe Acrobat pro 9 from ebay. The product was not deactivated, since the pc and the company no longer exists. Can I buy and activate the product ?
    (There is no possibility to ask Adobe. The chats are not working. No other contact is available.)
    http://www.ebay.de/itm/Adobe-Acrobat-9-PRO-Win-Vollversion-/141450672967?pt=Software&hash= item20ef1dfb47

    http://helpx.adobe.com/x-productkb/policy-pricing/transfer-product-license.html describes what must be done by the buyer AND the vendor. If you both cannot comply, the license cannot be transferred.

  • My computer was refreshed and the technician did not deactive the CS3 license first and the drive has been wiped. I have my serial number, how can I get it activated?

    My computer was refreshed and the technician did not deactive the CS3 license first and the drive has been wiped. I have my serial number, how can I get it activated?

    Hi pipper88,
    You can reinstall CS3 and enter the serial number to activate the software.
    Regards,
    Rave

  • Cannot contact provisioning server in sharepoint workspace 2010

    Hi, one user is getting below messages:
    "cannot contact provisioning server"
    "please enable account recovery for your account to avoid data loss"
    Please tell me how to reslove this issue.

    Hi,
    Could you provide more details about the issue? What did user operate to get this issue?
    Please check  and make sure the user has configured firewall to allow the connection.
    Please make sure that the user is  online by testing his Internet connectivity. Then log out and log in to SharePoint Workspace account and test whether this issue occurs.
    Here are several articles for your reference:
    https://support.office.com/en-us/article/Cannot-contact-provisioning-server-in-SharePoint-Workspace-2010-b2fe471e-1760-4706-956a-3f8089dbfe4e
    https://support.office.com/en-us/article/Enabling-account-recovery-for-your-SharePoint-Workspace-account-d10a276d-db44-4c02-9ff5-63929d37f11e
    Thanks,
    Dean Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • SQL Server Reporting Services Add-In for SharePoint not installing properly

    Environment: Windows Server 2008R2, SQL Server 2012, SharePoint 2013 Enterprise
    When I run the install for SQL Server 2012 Reporting Services Add-in for SharePoint it SHOULD install to c:\program files\common files\Microsoft Shared\Web Server Extensions\14 AND 15. Specifically it should drop a mess of ASPx pages for admin to the \templates\Admin\ReportServer
    folder. In this environment it only pushes them to the 14 folder and not the 15. Any ideas on why this would happen? I have not ever seen this before and it is hosing the install completely.

    Hi Gouranga,
    According to your description, when you install the SQL Server 2012 Reporting Services Add-in for SharePoint 2013, you find the files are installed into the folder for sharepoint 2010(..../14). Right?
    In Reporting Services, Not all features are supported in all combinations of report server, Reporting Services add-in for SharePoint, and SharePoint Products. Please see the linke below:
    Supported Combinations of SharePoint and Reporting Services Server and Add-in (SQL Server 2012)
    As you can see in the link, the SQL Server 2012 Reporting Services Add-in is only for Sharepoint 2010. This the reason why it's installed into the file for sharepoint 2010.
    Reference:
    Where to find the Reporting Services add-in for SharePoint Products (SharePoint 2010 and SharePoint 2013)
    Install or Uninstall the Reporting Services Add-in for SharePoint
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Netbootclientsx sharepoint not showing in netbooted machines

    In 10.4 Server, when a machine booted over Network in diskless mode, a sharepoint called NetBootClientsx appear on desktop.
    Now, on Leopard, Diskless Netbooting is fine, but no sharepoint appear.
    Is there any hidden feature into some plist file?
    Thanks
    Kostas

    i'm not sure how it works with Sharepoint... however, i can tell you how we use the portal integration kit within WebSphere Portal.
    first, the PIK itself is only used for BO integration, not Xcelsius integration (unless you are doing SSO in which case the BO login module is required).
    the Xcelsius integration comes from creating the web parts on the client. For example, for WebSphere there is a tool that is loaded onto the client machine called "XcelsiusPortletCreationUtility". the purpose of this utility is to take a swf file and wrap it in a war file that can be deployed to the portal. i would assume that  Sharepoint works in a similar way with a client utility.
    also, within the Xcelsius file you must create a portal data connection, even if it's not actually used.
    please look through your Xcelsius documentation or try to find the specific document that explains Sharepoint integration.

  • SO- my previous post was deleted by someone about SharePoint not talking to TFS

    If you are going to delete this, please have the courtesy to let me know before doing so.
    Our TFS SharePoint integration has ceased to work, and so far all the so called "fixes" have not worked to correct this. ON the TFS forum they are saying its a SharePoint issue. The databases are not corrupt according to my DBA without knowing
    exactly where to look in more depth. This is not a unique issue - I see other postings with the same issue. What I'm not seeing a good solution. Most are VAGUE in how it was resolved. I'm frustrated beyond belief on this! 
    We try to go to the website and we get this
    Server Error in '/' Application.
    Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.
    Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application.
    This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".
    Try to repair the connection and we get the following
      HTTP code 500: Internal Server Error
    Connecting project portal site at http://HOSTNAME/sites/PROJECT/Setup (118 of 118)
    [Error] Connection failed for project portal site athttp://HOSTNAME/sites/PROJECT/Setup: Please contact your administrator. There was an error contacting the server.
    Technical information (for administrator):
      HTTP code 500: Internal Server Error
    Event Debug log contains
     Message System.Data.SqlClient.SqlException (0x80131904): The DEFAULT_SCHEMA clause cannot be used with a Windows group or with principals mapped to certificates or asymmetric keys. ModifyExecRole account=OPENSCAN\OSSCM Group operation=1 Adding ...
    checking if login exists checking if dbo checking if already in role OPENSCAN\OSSCM Group is in the role. noop Setting default schema to dbo Failed to set default schema at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection,
    Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler,
    SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
    method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior) ClientConnectionId:32f02e94-6375-4465-9f8b-2c8e894cc479 
    Try to change or verify the Share Point Web Application Settings and get
    TF255329: The following site could not be accessed: {HOSTNAME URL}. The server that you specified did not return the expected response. Either you have not installed the Team Foundation Extensions for Share Products (which we have - it
    was working) or a firewall is blocking access..... Our IT person said there have been no firewall changes. 

    Hi Retzcat,
    I would like to do you the help. But same to Trevor, I don't have experiences on TFS integration.
    Here, I would just focus on the error message:
    The DEFAULT_SCHEMA clause cannot be used with a Windows group or with principals mapped to certificates or asymmetric keys
    The error happens in:
    In SQL Server, we have a login which is a Windows Group. It seems to be OPENSCAN\OSSCM in this case. Check from SQL Server Management Studio(SSMS), Server -> Security -> Logins, double-click OPENSCAN\OSSCM, in the coming window, the "Login Name"
    should be account for a domain group.
    Go to the WSS content database or the TFS database, Security -> Users, there should have OPENSCAN\OSSCM too.
    Now, seems the code execute a TSQL script like this:
    ALTER USER OPENSCAN\OSSCM WITH DEFAULT_SCHEMA = dbo;
    As by design, we can assign default schema for windows group. The query fail.
    Back to TFS integration, in this case, seems we are using a domain group as an account to configure the integration. Please try to change it to a domain user to fix the issue. For information on how to change the account, please go to TFS forum. Appreciate
    for your understanding.
    Thanks,
    Jinchun Chen
    Jinchun Chen(JC)
    TechNet Community Support

  • Xcelsius Portal Integration kit for Sharepoint not showing in the gallary

    Hi Experts,
    I am testing the Xcelsius in my organization. After creating a dashboard , I am trying to integrate it in my Sharepoint portal.
    For that I installed SP webpart container in the server. During installation it was not showing any wizard to me for selecting the options. After installation , i am trying to configure it in the webpart galary but ! couln't find the Xcelsius Webpart container in that list.
    What to do to show it ? Could anyone guide me ?
    Regards,
    Jyothi

    i'm not sure how it works with Sharepoint... however, i can tell you how we use the portal integration kit within WebSphere Portal.
    first, the PIK itself is only used for BO integration, not Xcelsius integration (unless you are doing SSO in which case the BO login module is required).
    the Xcelsius integration comes from creating the web parts on the client. For example, for WebSphere there is a tool that is loaded onto the client machine called "XcelsiusPortletCreationUtility". the purpose of this utility is to take a swf file and wrap it in a war file that can be deployed to the portal. i would assume that  Sharepoint works in a similar way with a client utility.
    also, within the Xcelsius file you must create a portal data connection, even if it's not actually used.
    please look through your Xcelsius documentation or try to find the specific document that explains Sharepoint integration.

  • REST Error Only On SharePoint Not On InfoPath

    Hi,
    I created data connection in InfoPath and export to data connection file.
    If I testing in InfoPath everything is ok, but in SharePoint site on intranet I get error.
    I try with:
    <udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication>
    but no ok.
    <?xml version="1.0" encoding="UTF-8"?>
    <?MicrosoftWindowsSharePointServices ContentTypeID="0x010100B4CBD48E029A4ad8B62CB0E41868F2B0"?>
    <udc:DataSource MajorVersion="2" MinorVersion="0" xmlns:udc="http://schemas.microsoft.com/office/infopath/2006/udc">
    <udc:Name>REST Web Service 2</udc:Name>
    <udc:Description>Format: UDC V2; Connection Type: Rest; Purpose: ReadOnly; Generated by Microsoft InfoPath 2010 on 2014-01-22 at 09:27:44 by GDN\MarcinC.</udc:Description>
    <udc:Type MajorVersion="2" MinorVersion="0" Type="Rest">
    <udc:SubType MajorVersion="0" MinorVersion="0" Type=""/>
    </udc:Type>
    <udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
    <udc:WsdlUrl/>
    <udc:SelectCommand>
    <udc:ListId/>
    <udc:WebUrl/>
    <udc:ConnectionString/>
    <udc:ServiceUrl UseFormsServiceProxy="false"/>
    <udc:SoapAction/>
    <udc:Query>http://moss/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='gdn\marcinc'</udc:Query>
    </udc:SelectCommand>
    <udc:UpdateCommand>
    <udc:ServiceUrl UseFormsServiceProxy="false"/>
    <udc:SoapAction/>
    <udc:Submit/>
    <udc:FileName>Specify a filename or formula</udc:FileName>
    <udc:FolderName AllowOverwrite=""/>
    </udc:UpdateCommand>
    <!--udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication-->
    </udc:ConnectionInfo>
    </udc:DataSource>

    Hi,
    Please check if you have configured the Secure Store service and then use the target application in data connections in the UDCX file, or state the credentials in the UDC file explicitly (less secure), then see if it works.
    Here are some articles with more informatin about this you can take a look.
    http://support.microsoft.com/kb/981684
    http://blogs.technet.com/b/rajbugga/archive/2013/08/07/infopath-over-claims-authentication-sharepoint-2010-amp-2013.aspx
    http://sharepointfull.blogspot.in/2013/03/getting-user-profile-information-in.html
    Thanks
    Daniel Yang
    TechNet Community Support

  • IE11 and SharePoint not compatible

    The calendar on SharePoint sites is not displaying properly in Internet Explorer.
    It was fine until today. Yesterday it looked the same as it always has, but today it looks completely different and there are no events displayed. It is stripped of all design and features, almost like the script that runs the calendar is being blocked.
    The calendar displays perfectly sin other browsers. Chrome, Firefox, etc.
    The problem is just in IE, and just started happening today.
    http://community.office365.com/en-us/f/154/t/233250.aspx

    http://community.office365.com/en-us/f/154/t/233250.aspx
    That shows that Compatibility View can be a workaround.  That means the user's browser makes requests as if it was an IE7 operating in Quirks mode.  You can also use the Developer Tools Emulation tab to achieve the same (or more appropriate) workaround 
    (F12, Ctrl-8); however, then it would have to be applied each time it was needed.
    The real fix would have to be on the server, to make it recognize the new IE11 User-Agent string and not make incorrect assumptions about its capabilities.  Otherwise, it is also possible for an override to be specified in IECompatData.xml which would
    be more persistent than either of those user applied overrides.  The user would just have to tick the 
    Use Microsoft Compatibility lists  box in the  Compatibility View Settings  (Alt-x b)
    In order to get some action started either way you can report the problem here:
    https://www.modern.ie/en-us/compat-issue-report
    FYI
    Robert Aldwinckle

Maybe you are looking for