Deploy Solution to subweb only

This topic contains 1 reply, has 2 voices, and was last updated by  Joe McShea 3 weeks, 1 day ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1940


    I think my title is already pretty self explaining 🙂
    So we have a Site Collection (in SPO), which were used in the past to setup a LOT of subwebs. All independent, all with broken inheritance.
    Now I wonder, if there is a chance to make the EasyForms available in certain subwebs only, but not for the whole site collection.

    Already tried to deploy the solution and then restricted the access to the assets folder in the Site Assets library of the root web, but the solution seems to keep running. Although the folder is not visible for the restricted user.

    I’m aware that sandbox solution has SC scope, but the manual deployment makes we wonder, if there is a workaround. Maybe a combination with a site feature could make sense? Deactivated by default, so site owner can decide if they want to use the functionality? Just thinking out loud.

    Best Regards


    Joe McShea

    Hi Michael,

    So making this work with a web scoped feature in a sandbox solution is a non-starter in my opinion. The problem is due to the way you upgrade sandbox solutions. You first deactivate the solution, which deactivates the feature everywhere it’s been activated. Then upload the solution, and finally activate the solution.

    What comes next is the problem. If the feature is site collection scoped, SharePoint automatically activates it when the solution is activated. But if it’s web scoped, it does not, and in fact there is no way to determine where it was activated before the upgrade at this point.

    So say I have a site collection with 100 subsites, 50 of which are using SPEasyForms. I deactivate, upgrade, and then what. I have to know all 50 sites that are using it, visit them individually, and activate the web scoped feature. That’s a nightmare.

    Now as you suggest, the non-sandbox deployment mechanism is a different story. It wouldn’t be hard to modify that utility page to set user custom actions in the current web instead of the site collection. Then you’d just drop it in a library in any site where you wanted to use SPEasyForms, open it up, and click the install button, and voila. I do think this introduces a bit of a maintenance burden. In an environment with may collections and many more sites, it would be hard to tell where SPEasyForms is in use, and what version they’re using, etc. But if you’re willing to accept this burden, and feel strongly that SPEasyForms is too invasive for sites where it’s not being used, this is a viable option.

    Like I said, modifying the script would be easy, and I may do it at some point, but I’m pretty busy these days so I can’t promise when that might be. If someone doesn’t want to wait, is willing to take a crack at it, get’s it working, and wants to share, I’ll be happy to post their solution too.


    • This reply was modified 3 weeks ago by  Joe McShea.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Scroll to top