SharePoint Online: How to deploy sandbox solutions

Sandboxed solutions will be hosted in the SharePoint user code solution worker process (SPUCWorkerProcess.exe) and run code that can only disturb or affect the site collection of the solution. Because sandboxed solutions don’t run in the IIS worker process, neither the IIS application pool nor the IIS server must restart. It means in case we have a server farm and there is multiple Site collection deployed, now we need to do some changes or develop something to the particular site collection, earlier we use to deploy farm Solution which was affecting the entire farm.  But the later developer has found the solution called Sandbox solution which will work on a particular site collection.

So today we are deploying solution sandbox on SharePoint online step by step with screen shots:

  • We need a Site collection to deploy sandbox solution in case if you have site collection login to the same or create new site collection
  • Once we will be login to the site collection, click Settings (gear) on the right side of the screen.
  • Once clicked site setting page, select site settings option from drop down option.

https://lh6.googleusercontent.com/57Qr0ei3WkOoLzUkC5ie3YprRy-FNCVTpgiHdZH-e2vpBwsBZquTNX1T_xL-JISkdKplfcrolW0xJVADJSQBLgQ3XccPuyBiQgpIh4qp7lQ_-5G_6P38n3xZCp0GgV0jY9oEbQ4ahcWYSZBVcg

  • Now select Solutions option from Web Designer and Galleries above highlighted the same.
  • Once selected solutions options, we will getting solution wizard, here option called Upload Solutions will be available from solutions tab.

https://lh4.googleusercontent.com/7r5ZaQjK7_nPzhw2Lqr_gW1umM2gxQk9FfS-aKgXXAKnqRYqKLWyRvszNvgjFu6tXZIOR41GHkLPsP1i7OKTKrlrD4yNiDNTZMcDD-V7a5Axlx5jbsWsOHbU9TktoEg6qZIghl10EBk7D1DnrQ

  • Now select the Upload Solutions, we will get Add a document wizard. Here we need to upload solutions file.
  • Once uploaded we need to activate the solutions here

https://lh3.googleusercontent.com/8gH_2291uFnt9xWadOR2vILUxwSem91zEARAQBBj7Stm7YTlC0-113dZX-mtxGvVKlXNf4eAS_glY1wt36DW9auKIT6dwhonRjKblAbHqokLYLQPABMViTcnvUFSvaH679HjW7biegXVJo08Jw

  • Once it will get activated we will be getting the page like below.

Note: Might be we will be getting error option, if sandbox Is having any issue or expired, we need to check details if the issue is occurring we need to fix the same.

https://lh6.googleusercontent.com/QCRY9rfYZsADiLmoCgIB-jjiP6yMSFMahqVkXhx4d-VPQFgU619umJutKqzYALbfsihf1-fQ_Pn1qV8sx5Nu5gEjlVNY3OMT2tlvJFEEVFYYf_CVqE_5x0dmroZVqHUfGQNOdCXmS1vUqE91sw

  • Now we can add web part which we have activated recently above.

Now to add web part of activated solutions, navigate any of site page and edit the page and click on Add a web part and select activated solution web part page.

https://lh6.googleusercontent.com/WA1OVnwoUEGOAE0Y-7FR3GDQcNMXstoWoo7ArgpdzfMvE_82pwvoVOu4NNroE2cGtOCCy3ktVToaMZ6YogPKK4bKdakC8NmHcmF2FuW1HFJ6uzKR3ZX_IweUeeMNyTMRfewHnteafTk8eiIzWw

  • Now once added, we can get output page like below:

https://lh6.googleusercontent.com/wAve2UpH3MyV8xms5mxDG3JoAdkBzMsKdgATT0GlSYknAwA9l4taj2ofTbjHQzT7ywCv9LZZnvcZM5E02q0SQskaXFWTBoEFd7DvfhubHsSNAKyhSlKnY3bnQ0jk_cqpur1NEqOXlr08FnDL2g