I'm working on a sandboxed solution which consists of two features. Locally, I've developed and tested my solution. On my development machine, I can properly deploy my solution to the sandbox, activate it and then activate my two features.

Now I perform the exact same steps in SharePoint Online. I upload my WSP and activate it. My features are added. Upon activation, one of the features consequently failes. I commented out the feature activation code (custom handler) because I thought that could be the problem, but that didn't make any difference.

So now I'm stuck with a feature which activates perfectly onpremise, but fails online. Now what? I have no clue on where to begin looking; the only thing I can come up with is clear all components from the feature and start adding them one by one to find the one which is causing the problem. But that's going to take a lot of time, so I wonder if there are better ways.

3 Answers 3


I could recommend you at least three things to consider, when it comes to Sandbox debugging:

  • Use logging library "SharePoint Sandbox Logging" to log errors on feature activation, as you probably know logging capabilities on Sandbox are limited.
  • If you receive Correlation Id with your error, contact Microsoft support
  • Review SharePoint logs for on-premises Sandbox to check for any errors, warnings that appear during activation

My experience shows that development on SharePoint Online should be iterative, as trying to deploy complex solution to SO usually ends with a failure.

  • Thanks. But I guess that would only work when the feature activation (or other code which errors out) is done in my own code. I can't really hook into the default feature page of SharePoint itself and implement a try/catch there.
    – Jasper
    Feb 15, 2012 at 14:14

It's always tricky...Have you tried literal debugging?

We want to track down the cause of this exception, so I am going to add a try / catch block around our code. When an exception is caught, we’ll use a new debugging method that we created to display the text of the exception.

  • Same as above: for a literal to display I need a page to put it on. And in the feature activation code you don't have a reference to a page, so nowhere to put the literal in the first place.
    – Jasper
    Feb 15, 2012 at 14:15
  • Create a custom list named Logs and write logs in there? Feb 15, 2012 at 15:22

This has happened with me once before. Try Removing the feature receiver file entirely and then activating the feature on SharePoint Online. Do not just comment the code, delete the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.