SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a site definition in which I have a series of web scoped features getting activated.

Some of the features are meant to set targetting audiences on webparts, some of them are creating lists to be shown in webparts etc.

What I want to know is; In what order does the site definition create pages, subsites, activate features, run timerjobs etc and what is best practice to ensure the entire workflow runs correctly?

share|improve this question
up vote 2 down vote accepted

SharePoint MCM Mirjam van Olst has written everything about the provisioning order:

Bottom line is that building pages with web parts using Site Definitions is very complex, and often leads to bad solution designs. I would suggest that you look into using WebTemplates instead:

share|improve this answer
Thank you for the links. Another thing I'm interested in knowing then, is when I'm attaching a SPWebProvisionProvider to the site template, does the code in this provider then run before, alongside or after the site definition provisioning? – Daniel Ziga Aug 8 '11 at 12:18
With a provsioning provider, you'll basically do it all manually... – Wictor Wilen MCA MCM MVP Aug 8 '11 at 13:37

Your Answer


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.