sharepointsharepoint-2010farm-solutionsandbox-solution

How a Sharepoint Sandbox Solution is saved


I have been watching some Pluralsight training videos on SharePoint development.

One of the things I see is that you can make a sandbox solution or a Farm Solution.

From the training video, it says that the sandbox solution does not change the file system of the SharePoint Server at all. (While a Farm Solution is deployed to the GAC and saved in the SharePoint directories.)

So, my question is, if it is not stored on the file system how is it persisted? When I upload a SandBox solution and then reboot my SharePoint server, where is the sandbox solution loaded from if it is not on the file system anywhere?

I am guessing that the trainer made an oversight and that the sandbox solution is saved somewhere "safe". My question is, how does that work? If it is not saved, then how is it re-loaded after the SharePoint Server reboots? If it is saved, where is it saved?


Solution

  • When a sandboxed solution is deployed the assemblies are contained in the WSP package - which is persisted to the content database. The sandbox solution content is kept in the 'Solutions' table in the content database itself (see Definitions column).

    They are only put into the UCCache when the assemblies are ran (such as a page load) and they are removed at some point afterwards.

    See - Microsoft SharePoint Developer Documentation Team Blog > Where are Assemblies in Sandboxed Solutions Deployed?