Activating web scoped feature that is installed in the solution gallery


  • I have a situation n a sandbox solution where I need to activate a web scoped feature grammatically.

    I found out that the guid is 8822d564-5afe-4b94-8856-df1a7b2d84db

    but when I use  web.Features.Add(new Guid("{8822d564-5afe-4b94-8856-df1a7b2d84db}"));

    I get the error:"Feature with Id '8822d564-5afe-4b94-8856-df1a7b2d84db' is not installed in this farm, and cannot be added to this scope."

    this is right because it is not installed in the farm it is installed at the site collection.

    I tried to iterate the parent site collection FeatureDefenitions but this type is not available in a sandbox solution.

    So what other option do I have?


    Ofer Gal

    Friday, July 26, 2013 1:20 PM


All replies