Differences Between Sandboxed and Farm Solutions in SharePoint 2013

This SharePoint 2013 tutorial explains, what are the difference between sandboxed solution and farm solution in SharePoint 2013.

Differences Between Sandboxed and Farm Solutions in SharePoint 2013

Sandboxed solutions are introduced in SharePoint 2010 and was one of the popular models of development in SharePoint 2010. Now in SharePoint online and also in SharePoint 2016, the sandboxed solution has been deprecated.

We should not use Sandboxed solutions, rather we should develop using SharePoint Add-in model for both SharePoint on-premise as well as SharePoint online.

Farm solutions are deployed via SharePoint 2013 central administration or by using PowerShell. It first uploaded by using PowerShell to Farm solution store which is in the SharePoint configuration database.

Once the solution has been added it can be deployed to the particular location after that only users can start using the functionality. You can see How to deploy farm wsp solution in sharepoint 2010 using PowerShell?.

On the other hand Sandboxed solutions usually uploaded to a site collection’s solution gallery by site collection administrators.

Usually, Sandboxed solutions are uploaded and activated by site collection administrators. The sandbox solution stores in the content database where the site collection is stored in.

A sandboxed solution and its contents will not be deployed to the SharePoint server’s file system. The functionality from a sandboxed solution is only available in the site collection or collections where it has been deployed. You can see: How to deploy a sandboxed solution in SharePoint 2010?

Farm Solutions in SharePoint

  • Farm solutions are hosted in the IIS worker process (W3WP.exe).
  • If you run any code in farm solution the whole farm will get affected.
  • If you deploy any feature or retract any feature the whole application pool got recycled.
  • Since they are scoped as farm level, they have full trust access to all the resources.
  • When the Sandboxed Solution property is set to False, selecting Build\Deploy will deploy the solution to the Farm Solution Gallery.

Sandboxed Solutions in SharePoint

  • Sandboxed solutions are hosted in the SharePoint user code solution worker process (SPUCWorkerProcess.exe).
  • The process runs under a CAS policy that restricts programmatic access to any resource outside the sandbox. So it never restarts the IIS application pool.
  • If you run any code it will affect only the site collection of the solution.
  • Helpful if you have shared hosting.
  • When the Sandboxed Solution property is set to True, selecting Build\Deploy Solution deploys the solution to the site collection Solution Gallery.

One major difference in the deployment is Farm solutions are installed and deployed. Sandboxed solutions are uploaded and activated.

You may like following SharePoint tutorials:

Hope this SharePoint tutorial explains, differences Between Sandboxed and Farm Solutions in SharePoint 2013.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.