Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to develop a custom web template to use with SharePoint Online. I created an empty web online and saved it as a template (without content). I then loaded that WSP into Visual Studio and made some changes. The altered WSP is uploaded to the sandbox solution store and activates. So far, so good.

But now upon deployment, something goes wrong. Ok, probably made a mistake somewhere: but where? The error is not really informing and there's no way to look in the logs for SharePoint online (at least not that I know of).

So I then tried deploying the same solution to an on premise SharePoint environment to be able to debug things. But apparantly, SharePoint Online activates a bunch of features which are unavailable in an onpremise installation. They're included in the template, so when I now try to create a site in my onpremise environment, it's complaining about missing features.

I'm getting a bit lost here. What's a good way to debug these things?

share|improve this question
add comment

3 Answers 3

up vote 6 down vote accepted

There is no good way to debug in SharePoint online. You basically have two options

  • Remove/add pieces of declarative content one at a time to rule out any failing parts
  • If you have code that do the provisioning, use a list to log all exceptions.
share|improve this answer
    
Ari Bakker has an example on how to logto a list here sharepointconfig.com/2011/11/developing-for-sharepoint-online –  Anders Rask Dec 23 '11 at 7:10
    
@Anders; Thanks, but that isn't a solid approach in all circumstances. Example: provisioning a site from a web template won't write debug lines I assume? Although you could script the creating of the site in a webpart and catch the exception like that I guess. –  Jasper Dec 27 '11 at 7:44
    
WebTemplates are ofcourse all declarative, so there is no code to debug! Check out my new answer and add more info to question regarding what web part we are talking about to help you further –  Anders Rask Dec 27 '11 at 19:59
    
Anders - the actual WebTemplate are declarative but it's likely that you have feature receivers with code. In my experience the timeouts for provisioning a site are shorter than on-prem and code might slow you down further - and don't forget if you have the publishing features in the WT then it will likely fail most of the times since there are so many files that needs provisioning (which takes time) –  Wictor Wilen MCA MCM MVP Dec 28 '11 at 8:57
    
As for the missing feature part, please see blog.repsaj.nl/index.php/2011/12/…; there are indeed some features which are online-only. –  Jasper Dec 28 '11 at 12:13
add comment

Have a look at this

http://blogs.msdn.com/b/mvpawardprogram/archive/2011/05/31/mvps-for-sharepoint-2010-debugging-techniques-for-sharepoint-online-applications.aspx

share|improve this answer
1  
Hi @Ian and welcome to our forum. Could you maybe elaborate a bit in your answer what makes this a solution, and then link to the blog? We like to keep as much as possible inside the actual answer as possible, and while linking out is perfectly ok, external links tend to die faster than our site :) –  Anders Rask Dec 23 '11 at 7:06
add comment

Ok scratch that answer. I obviously didnt read your question well enough before answering :(

What I would do to debug is to import the package into Visual Studio 2010 (import WSP SharePoint 2010 Project type). Then I would track down feature ID's that are missing and try to get some info on them by googling the GUID.

If need be, comment these features out in the web templates ONET.XML, if they really are SPOL only (there are a chance that the error you are experiencing is related to the features as well, but disabling them will bring you a step further if it is not).

After disabling the SPOL features, package the solution and deploy it as a Sandboxed Solution.

share|improve this answer
    
Thanks, that was indeed the solution I though of too :) See blog.repsaj.nl/index.php/2011/12/… –  Jasper Jan 3 '12 at 13:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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