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:
- Open the Central Administration
- Go to Application Management -> Manage Services on Server
- Make sure that the Microsoft SharePoint Foundation Sandbox Code Service is running
- 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
- Locate Microsoft SharePoint Foundation Sandboxed Code Service and Enable Auto Provision
- 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
- 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.
- Open the Central Administration
- Go to Security -> Configure Service Accounts
- Select the Windows Service – Microsoft SharePoint Foundation SandBox Code Service
- Select an account with Full Control rights
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.
February 23, 2017
Hi Joao
I have Actived a solution as you said successful. But i can not find it when i add a column in column type.
Can you tell me why?
My english is so bad. Thank you very much.
ken
February 28, 2017
Hi Ken,
Without knowing the solution is hard to tell what might the cause of your issue.
Try to transform your solution into a declarative solution only, you can find more information about it in this link.
My best,
João Ferreira
August 14, 2017
Hi,
Would this solution also work for SharePoint Online? If not are you aware of any solution for Office365?
Thanks,
Tom
August 14, 2017
This solution is exclusive for SharePoint 2016 on prem. For the online you need to activate scripting in the admin center, it can take up to 24 hours to get activated. You can find more information about how to do it here: http://social.technet.microsoft.com/wiki/contents/articles/37533.sharepoint-online-how-to-enable-custom-script.aspx
If your solution still has managed (dll files) code you will not be able to activate the solution. You can read more about the sandbox solutions support here: http://sharepoint.handsontek.net/2017/02/19/can-you-still-use-sandbox-solutions-in-2017/
September 8, 2017
I’m not sure if I understood your question, to upload SandBox solutions on your root site you need to go to Site Settings and then Solutions.
Let me know if this helps.