Bluedog Limited > SharePoint Thoughts > Posts > Not all sandboxes are the same (aka working with Office 365)
May 26
Not all sandboxes are the same (aka working with Office 365)
I recently ran into a problem with an Excel project that I've been working on.  The code was specifically designed to work as a Sandbox solution.  (teaser: PowerPivot users will like this add-on!)
All was good.  Code was fully operational and churning along quite nicely in every test platform.  Then we decided to increase the test matrix to include Office 365.
We hit a hard wall - the solution wasn't even allowed to Activate.
It was clear - Office 365 was using a custom solution validator (see SPSolutionValidator) and my solution package was obviously causing validation to fail. That was highly disappointing.  The largest arena for my primary deployment target was unavailable.  It was time to throw on the investigative hat to figure where the problem specifically existed and how to fix it. 
After chatting with fellow MCMs, it's pretty clear that we've stumbled into a generic problem.  The Office 365 team has decided to place a set of restrictions on top of the normal sandbox limitations.  These restrictions are obviously something they have evaluated and determined to be worth implementing.
As a quick refresher, let's look at our deployment targets:
  1. Farm
    • Fully trusted
    • Partially trusted
  2. Sandbox
    • Out of box config
    • Custom restrictions via validators

As you can see now, solution validators are the game changers when it comes to working with sandbox solutions.  The real answer to our problem is understanding what rules are being enforced. 

With a list of known rules, you can obviously tailor your code to that environment.  Again, thanks to the MCMs, all of us now have a little more insight into what it takes to develop products for Office 365. 

Here's two resources that developers can reference:

It's worth calling out that the FxCop rules are brand spanking new thanks to Kimmo Forss, a fellow MCM and member of the Office 365 team.  The FxCop rules are still a work in progress as Kimmo and team work out a few other issues; however, with more info and tools, developers should have a better grasp of what is and is not allowed on Office 365.

Happy sandbox coding...




Ohh Man....

I agree....I wasn't aware of the limitations.  It's easy to develop and debug on dev environment.  But when I deployed to SandBox, it activated, but something was amiss.  It was as if the code didn't run.

Having a hard time debugging on office 365 now.
 on 11/21/2012 4:17 PM

© 2004-2013 Okean Solutions
Aptillon, Inc.
Microsoft Certified Master - SharePoint 2010 & 2007
Sign In