How to activate a Sandbox solution in SharePoint Online

This script allows to activate an existing Sandbox solution in a SharePoint Online Site Collection using the Client Side Object Model. In order to get the script working  roperly, it’s required to enable publishing features in your site collection so you can successfully use th

 
 
 
 
 
5 Star
(2)
1,373 times
Add to favorites
Office 365
10/29/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • SP Online
    2 Posts | Last post September 24, 2018
    • Hi Juan 
      
      I tried running the script but I get the error below: 
      
      Microsoft.SharePoint.Client.ServerException: Activation of solutions with sandboxed code has been disabled.
         at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
         at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
         at CallSite.Target(Closure , CallSite , Object )
      
      Please advise if this script will still work on SP online. 
      
      Thank you 
    • Hi Somar,
      Well, sorry to tell you that the error you are having is expected: if you are trying to actívate a Sandbox solution with code, you will not be able to do it because it's not allowed in SharePoint Online.
      
  • How to deactivate the wsp file in SP Online?
    1 Posts | Last post September 15, 2017
    • Hi Juan,
      
      Thanks for the code to Install wsp. I am trying to deactivate the wsp and upload and activate the updated one. I am using UnInstall command to do this but I get the below error:
      
      "Exception calling "ExecuteQuery" with "0" argument(s): "The design is currently applied. Please apply a different design and retry.""
      
      Below is the code I am using for UnInstall:
      
      [Microsoft.SharePoint.Client.Publishing.DesignPackage]::UnInstall($ctx, $ctx.Site, $wsp)
      		$ctx.ExecuteQuery()
      		Write-Host "Uninstall Done"
      
      I tried using '15' and '16' versions on dlls.
      
      Can you please let me know the resolution for this or if there is any?
  • How can I deactivate a solution?
    2 Posts | Last post December 11, 2016
    • I am using CSOM and installing a Sp2013 workflow package using this approach.
      
      If I use CSOM to attempt to uninstall my package, I get an error that I can only uninstall from a public facing solution.
      
      Yet I can log into my O365 site, go to app settings and deactivate and then delete the solution.
      
      Are these commands (deactivate, delete) exposed through CSOM? I can't seem to find them if they are.
    • Yes, they should be...PowerShell is just another way to use CSOM versus using a regular CSOM program / App
  • Context error
    2 Posts | Last post January 31, 2015
    • Hi 
      I get this error
      
      Cannot convert the "Microsoft.SharePoint.Client.ClientContext" value of type "Microsoft.SharePoint.Client.ClientContext" to type "Microsoft.SharePoint.Client.ClientRuntimeContext".
    • Hello Megan,
      What version of SharePoint Online CSOM are you using? Apparently, the problema is due to the assemblies you are using
  • Code Comment is not applicable
    2 Posts | Last post October 29, 2014
    • The first comment mentions adding uses to a SPO group. which does not seem correct, is that left over from another script?
    • Hi Dean,
      You are correct, the first comment is a left over from another script...it should be fixed from know