Enable Sandbox solutions on SharePoint 2016

Sandbox solutions and web parts are deprecated for a long time but due all the restrictions of the SharePoint app model caused the iframes this is still the best way to deliver rich web parts that fully integrate with the site and other solutions like custom themes.

Microsoft is pushing user’s way from this model by creating limitations to Sandbox solutions like removing sandbox solutions with managed code from Office 365 and deactivating the execution service by default on SharePoint 2016.

The actions that Microsoft is taking are not necessary bad, in my opinion they are applying them just too soon, there is already a new model to develop web parts without the iframe limitation but this model is part of the new SharePoint Framework and unfortunately it isn’t yet available!

If you are trying to activate a sandbox solution on SharePoint 2016 and your activation button is disabled follow the steps bellow.

Note that in order to activate a Sandbox solution you need to be a Site Collection admin and the Sandbox execution service needs to be running in your server.

To check if the service is running do the following:

  1. Open the Central Administration
  2. Go to Application Management -> Manage Services on Server
  3. Make sure that the Microsoft SharePoint Foundation Sandbox Code Service is running
  4. If the server is not running, you will notice that is not possible to activate it directly from the services page. To start the service, go to System Settings -> Manage Services in this Farm
  5. Locate Microsoft SharePoint Foundation Sandboxed Code Service and Enable Auto Provision
  6. If the provision fails open the console SharePoint Management Shell and execute this command

    Get-SPServiceInstance -server $env:COMPUTERNAME | where-object {$_.TypeName -eq "Microsoft SharePoint Foundation Sandboxed Code Service"} | Start-SPServiceInstance -confirm:$false > $null
  7. In your server open the services window and check if the SharePoint User Code Host is running

If the service is started and the Activate button is not yet active you will need to elevate the privileges In the WebApplication UserPolicy, add the Service Account used for Microsoft SharePoint Foundation Sandboxed Code Service with Full Control rights.

  1. Open the Central Administration
  2. Go to Security -> Configure Service Accounts
  3. Select the Windows Service – Microsoft SharePoint Foundation SandBox Code Service
  4. Select an account with Full Control rights


One Response to “Enable Sandbox solutions on SharePoint 2016”

  1. Sarabeth Marcello

    November 8, 2016

    Awesome–thanks for taking the time to include so many visuals. I’ve included a link to this post in my recent post about features to watch that have changed in SharePoint Server 2016.

    Reply

Leave a Reply


Who I am?

Web developer focused on SharePoint branding, blogger, tech enthusiast. Traveling and sports are my addictions, knowledge and success are my daily motivations.