Failing to activate a feature using COM in SharePoint 2010 -
guid featureid = new guid("0af5989a-3aea-4519-8ab0-85d91abe39ff"); clientcontext clientcontext = new clientcontext("http://mysite:786/"); site clientsite = clientcontext.site; clientcontext.load(clientsite); featurecollection clientsitefeatures = clientsite.features; clientcontext.load(clientsitefeatures); clientcontext.executequery(); // activate feature clientsite.features.add(featureid, true, featuredefinitionscope.site); //clientsitefeatures.remove(featureid, false); clientcontext.executequery(); messagebox.show("success");
when running code, getting exception: feature id "0af5989a-3aea-4519-8ab0-85d91abe39ff" isn't installed in farm , can't added scope.
i got feature id link http://social.technet.microsoft.com/wiki/contents/articles/7695.list-of-sharepoint-2010-features-id-displayname-and-scopes.aspx
please guide.
regards, vikrant raj behal
featuredefinitionscope.none
this activated web-scoped feature me.
Comments
Post a Comment